mirror of
https://github.com/truenas/charts.git
synced 2026-06-28 00:06:45 +08:00
NAS-122154 / 23.10 / Add rsyncd to community train (#1227)
* add initial files * add some validation and fix image tag * add modules to the config * extend test and add capabilities * add extra test * rsync -> Rsync and add metadata file * add UI * hide questions when module is disablwed * rename test file and add validation to questions * remove dot * update wording * remove logToStdout toggle * update image
This commit is contained in:
97
library/ix-dev/community/rsyncd/templates/_rsync.tpl
Normal file
97
library/ix-dev/community/rsyncd/templates/_rsync.tpl
Normal file
@@ -0,0 +1,97 @@
|
||||
{{- define "rsync.workload" -}}
|
||||
workload:
|
||||
rsync:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
hostNetwork: {{ .Values.rsyncNetwork.hostNetwork }}
|
||||
containers:
|
||||
rsync:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
runAsNonRoot: false
|
||||
readOnlyRootFilesystem: false
|
||||
capabilities:
|
||||
add:
|
||||
- CHOWN
|
||||
- DAC_OVERRIDE
|
||||
- FOWNER
|
||||
- SETGID
|
||||
- SETUID
|
||||
- SYS_CHROOT
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
pgrep rsync
|
||||
readiness:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
pgrep rsync
|
||||
startup:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
pgrep rsync
|
||||
|
||||
{{/* Service */}}
|
||||
service:
|
||||
rsync:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: NodePort
|
||||
targetSelector: rsync
|
||||
ports:
|
||||
rsync:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: {{ .Values.rsyncNetwork.rsyncPort }}
|
||||
nodePort: {{ .Values.rsyncNetwork.rsyncPort }}
|
||||
targetSelector: rsync
|
||||
|
||||
{{/* Persistence */}}
|
||||
persistence:
|
||||
temp:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
targetSelector:
|
||||
rsync:
|
||||
rsync:
|
||||
mountPath: /tmp
|
||||
rsync-conf:
|
||||
enabled: true
|
||||
type: configmap
|
||||
objectName: config
|
||||
targetSelector:
|
||||
rsync:
|
||||
rsync:
|
||||
mountPath: /etc/rsyncd.conf
|
||||
subPath: rsyncd.conf
|
||||
readOnly: true
|
||||
{{- range $idx, $mod := .Values.rsyncModules }}
|
||||
{{ printf "rsyncd-%v" (int $idx) }}:
|
||||
enabled: {{ $mod.enabled }}
|
||||
type: hostPath
|
||||
hostPath: {{ $mod.hostPath | default "" }}
|
||||
targetSelector:
|
||||
rsync:
|
||||
rsync:
|
||||
mountPath: {{ printf "/data/%v" $mod.name }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user