diff --git a/catalog.json b/catalog.json index 86aab0a013..aa99a53dea 100644 --- a/catalog.json +++ b/catalog.json @@ -376,7 +376,7 @@ "latest_version": "1.0.22", "latest_app_version": "230603", "latest_human_version": "230603_1.0.22", - "last_update": "2023-05-23 17:11:03", + "last_update": "2023-06-05 10:20:26", "name": "photoprism", "recommended": false, "title": "PhotoPrism", @@ -637,6 +637,42 @@ ], "icon_url": "https://github.com/AdguardTeam/AdGuardHome/raw/master/doc/adguard_home_darkmode.svg" }, + "rsyncd": { + "app_readme": "
Rsyncd is an open source utility that provides fast incremental file transfer.
", + "categories": [ + "storage" + ], + "description": "Rsync is an open source utility that provides fast incremental file transfer.", + "healthy": true, + "healthy_error": null, + "home": "https://github.com/truenas/containers/tree/main/apps/rsyncd", + "location": "/__w/charts/charts/community/rsyncd", + "latest_version": "1.0.0", + "latest_app_version": "1.0.0", + "latest_human_version": "1.0.0_1.0.0", + "last_update": null, + "name": "rsyncd", + "recommended": false, + "title": "Rsync Daemon", + "maintainers": [ + { + "name": "truenas", + "url": "https://www.truenas.com/", + "email": "dev@ixsystems.com" + } + ], + "tags": [ + "sync", + "file transfer" + ], + "screenshots": [], + "sources": [ + "https://github.com/truenas/containers/tree/main/apps/rsyncd", + "https://github.com/truenas/charts/tree/master/community/rsyncd", + "https://hub.docker.com/r/ixsystems/rsyncd" + ], + "icon_url": "https://rsync.samba.org/newrsynclogo.jpg" + }, "jellyfin": { "app_readme": "Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media.
\n\n", "categories": [ diff --git a/community/rsyncd/1.0.0/Chart.lock b/community/rsyncd/1.0.0/Chart.lock new file mode 100644 index 0000000000..53e99085b0 --- /dev/null +++ b/community/rsyncd/1.0.0/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.0.8 +digest: sha256:254efaa1285f634b7a80b7baadeadbd20a680f7fee49d1d9d3c4618aa0d657ad +generated: "2023-05-30T19:34:09.862999313+03:00" diff --git a/community/rsyncd/1.0.0/Chart.yaml b/community/rsyncd/1.0.0/Chart.yaml new file mode 100644 index 0000000000..39006515a7 --- /dev/null +++ b/community/rsyncd/1.0.0/Chart.yaml @@ -0,0 +1,26 @@ +name: rsyncd +description: Rsync is an open source utility that provides fast incremental file transfer. +annotations: + title: Rsync Daemon +type: application +version: 1.0.0 +apiVersion: v2 +appVersion: 1.0.0 +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ + email: dev@ixsystems.com +dependencies: + - name: common + repository: file://../../../common + version: 1.0.8 +home: https://github.com/truenas/containers/tree/main/apps/rsyncd +icon: https://rsync.samba.org/newrsynclogo.jpg +sources: + - https://github.com/truenas/containers/tree/main/apps/rsyncd + - https://github.com/truenas/charts/tree/master/community/rsyncd + - https://hub.docker.com/r/ixsystems/rsyncd +keywords: + - rsync + - sync diff --git a/community/rsyncd/1.0.0/README.md b/community/rsyncd/1.0.0/README.md new file mode 100644 index 0000000000..f9345e4947 --- /dev/null +++ b/community/rsyncd/1.0.0/README.md @@ -0,0 +1,3 @@ +# Rsyncd + +[Rsyncd](https://rsync.samba.org/) is an open source utility that provides fast incremental file transfer. diff --git a/community/rsyncd/1.0.0/app-readme.md b/community/rsyncd/1.0.0/app-readme.md new file mode 100644 index 0000000000..f9345e4947 --- /dev/null +++ b/community/rsyncd/1.0.0/app-readme.md @@ -0,0 +1,3 @@ +# Rsyncd + +[Rsyncd](https://rsync.samba.org/) is an open source utility that provides fast incremental file transfer. diff --git a/community/rsyncd/1.0.0/charts/common-1.0.8.tgz b/community/rsyncd/1.0.0/charts/common-1.0.8.tgz new file mode 100644 index 0000000000..bdbd785aba Binary files /dev/null and b/community/rsyncd/1.0.0/charts/common-1.0.8.tgz differ diff --git a/community/rsyncd/1.0.0/ci/hostnet-multiple-values.yaml b/community/rsyncd/1.0.0/ci/hostnet-multiple-values.yaml new file mode 100644 index 0000000000..3b7d1fbc39 --- /dev/null +++ b/community/rsyncd/1.0.0/ci/hostnet-multiple-values.yaml @@ -0,0 +1,59 @@ +rsyncNetwork: + hostNetwork: true + +rsyncConfig: + auxParams: + - param: test-param + value: test-value + - param: test-param2 + value: test-value2 +rsyncModules: + - enabled: true + name: module_name1 + comment: "Comment for module" + hostPath: /mnt/{{ .Release.Name }}/module1 + accessMode: RW + maxConnections: 0 + uid: 0 + gid: 0 + hostsAllow: + - 10.10.10.1 + - 10.10.10.2 + hostsDeny: + - 11.10.10.1 + - 11.10.10.2 + auxParams: + - param: mod-param1 + value: mod-value1 + - param: mod-param2 + value: mod-value2 + - enabled: true + name: module_name2 + comment: "Comment for module2" + hostPath: /mnt/{{ .Release.Name }}/module2 + accessMode: WO + maxConnections: 100 + uid: 568 + gid: 568 + hostsAllow: + - 10.10.10.1 + - 10.10.10.2 + hostsDeny: + - 11.10.10.1 + - 11.10.10.2 + auxParams: + - param: mod-param1 + value: mod-value1 + - param: mod-param2 + value: mod-value2 + - enabled: true + name: module_name3 + comment: "Comment for module3" + hostPath: /mnt/{{ .Release.Name }}/module3 + accessMode: RW + maxConnections: 0 + uid: 1000 + gid: 1000 + hostsAllow: [] + hostsDeny: [] + auxParams: [] diff --git a/community/rsyncd/1.0.0/ci/multiple-values.yaml b/community/rsyncd/1.0.0/ci/multiple-values.yaml new file mode 100644 index 0000000000..8206af97ae --- /dev/null +++ b/community/rsyncd/1.0.0/ci/multiple-values.yaml @@ -0,0 +1,56 @@ +rsyncConfig: + auxParams: + - param: test-param + value: test-value + - param: test-param2 + value: test-value2 +rsyncModules: + - enabled: true + name: module_name1 + comment: "Comment for module" + hostPath: /mnt/{{ .Release.Name }}/module1 + accessMode: RW + maxConnections: 0 + uid: 0 + gid: 0 + hostsAllow: + - 10.10.10.1 + - 10.10.10.2 + hostsDeny: + - 11.10.10.1 + - 11.10.10.2 + auxParams: + - param: mod-param1 + value: mod-value1 + - param: mod-param2 + value: mod-value2 + - enabled: true + name: module_name2 + comment: "Comment for module2" + hostPath: /mnt/{{ .Release.Name }}/module2 + accessMode: WO + maxConnections: 100 + uid: 568 + gid: 568 + hostsAllow: + - 10.10.10.1 + - 10.10.10.2 + hostsDeny: + - 11.10.10.1 + - 11.10.10.2 + auxParams: + - param: mod-param1 + value: mod-value1 + - param: mod-param2 + value: mod-value2 + - enabled: true + name: module_name3 + comment: "Comment for module3" + hostPath: /mnt/{{ .Release.Name }}/module3 + accessMode: RW + maxConnections: 0 + uid: 1000 + gid: 1000 + hostsAllow: [] + hostsDeny: [] + auxParams: [] diff --git a/community/rsyncd/1.0.0/ix_values.yaml b/community/rsyncd/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..55d512b93b --- /dev/null +++ b/community/rsyncd/1.0.0/ix_values.yaml @@ -0,0 +1,17 @@ +image: + repository: ixsystems/rsyncd + pullPolicy: IfNotPresent + tag: '1.0.0' + +resources: + limits: + cpu: 4000m + memory: 8Gi + +rsyncConfig: + maxConnections: 4 + auxParams: [] +rsyncNetwork: + hostNetwork: false + rsyncPort: 30000 +rsyncModules: [] diff --git a/community/rsyncd/1.0.0/metadata.yaml b/community/rsyncd/1.0.0/metadata.yaml new file mode 100644 index 0000000000..35e5b8bdc8 --- /dev/null +++ b/community/rsyncd/1.0.0/metadata.yaml @@ -0,0 +1,20 @@ +runAsContext: + - userName: root + groupName: root + gid: 0 + uid: 0 + description: Rsync requires root privileges to start it's processes. +capabilities: + - name: CHOWN + description: Rsync requires this ability to change ownership of files. + - name: DAC_OVERRIDE + description: Rsync requires this ability to override file permissions. + - name: FOWNER + description: Rsync requires this ability to override file ownership. + - name: SETUID + description: Rsync requires this ability to switch user for sub-processes. + - name: SETGID + description: Rsync requires this ability to switch group for sub-processes. + - name: SYS_CHROOT + description: Rsync requires this ability to use chroot for it's sub-processes. +hostMounts: [] diff --git a/community/rsyncd/1.0.0/questions.yaml b/community/rsyncd/1.0.0/questions.yaml new file mode 100644 index 0000000000..154b2c03e6 --- /dev/null +++ b/community/rsyncd/1.0.0/questions.yaml @@ -0,0 +1,230 @@ +groups: + - name: Rsync Configuration + description: Configure Rsync + - name: Network Configuration + description: Configure Network for Rsync + - name: Module Configuration + description: Configure Modules for Rsync + - name: Resources Configuration + description: Configure Resources for Rsync + +questions: + - variable: rsyncConfig + label: "" + group: Rsync Configuration + schema: + type: dict + attrs: + - variable: auxParams + label: Auxillary Parameters + description: Configure auxillary parameters for Rsync. + schema: + type: list + default: [] + items: + - variable: auxEntry + label: Auxillary Parameter Entry + schema: + type: dict + attrs: + - variable: param + label: Parameter + schema: + type: string + required: true + - variable: value + label: Value + schema: + type: string + required: true + + - variable: rsyncNetwork + label: "" + group: Network Configuration + schema: + type: dict + attrs: + - variable: hostNetwork + label: Host Network + description: | + Bind to the host network. It's recommended to keep this disabled. + schema: + type: boolean + default: false + - variable: rsyncPort + label: Rsync Port + description: The port for Rsync. + schema: + type: int + default: 30000 + min: 9000 + max: 65535 + required: true + + - variable: rsyncModules + label: "" + group: Module Configuration + schema: + type: list + default: [] + empty: false + required: true + items: + - variable: module + label: Rsync Module + schema: + type: dict + attrs: + - variable: name + label: Module Name + description: | + Module name that matches the name requested by the rsync client. + schema: + type: string + valid_chars: '^[a-zA-Z0-9]+([_-]*[a-zA-Z0-9]+)+$' + valid_chars_error: | + Module Name, can include [Letters (a-z, A-Z), Numbers (0,9), Underscore (_), Dash (-)], + but cannot start or end with [Underscore (_), Dash (-), Dot (.)] + required: true + - variable: enabled + label: Enable Module + schema: + type: boolean + default: true + show_subquestions_if: true + subquestions: + - variable: comment + label: Comment + description: Describe the module. + schema: + type: string + - variable: hostPath + label: Host Path + description: | + The path on the host to be shared with the client. + This path must exist on the host. + schema: + type: hostpath + required: true + - variable: accessMode + label: Access Mode + description: | + Choose permissions for this rsync module. + schema: + type: string + required: true + default: RO + enum: + - value: RO + description: Read Only + - value: RW + description: Read Write + - value: WO + description: Write Only + - variable: maxConnections + label: Max Connections + description: | + Maximum number of simultaneous connections to this module. + 0 means unlimited. + schema: + type: int + min: 0 + max: 1000 + default: 0 + required: true + - variable: uid + label: UID + description: | + The UID to use for this module. + schema: + type: int + min: 0 + max: 65535 + default: 568 + required: true + - variable: gid + label: GID + description: | + The GID to use for this module. + schema: + type: int + min: 0 + max: 65535 + default: 568 + required: true + - variable: hostsAllow + label: Hosts Allow + description: | + List of hosts allowed to connect to this module. + Leave empty to allow all hosts. + schema: + type: list + default: [] + items: + - variable: host + label: Host to allow + schema: + type: string + required: true + - variable: hostsDeny + label: Hosts Deny + description: | + List of hosts denied to connect to this module. + Leave empty to deny no hosts. + schema: + type: list + default: [] + items: + - variable: host + label: Host to deny + schema: + type: string + required: true + - variable: auxParams + label: Auxillary Parameters + description: Configure auxillary parameters for this module. + schema: + type: list + default: [] + items: + - variable: auxEntry + label: Auxillary Parameter Entry + schema: + type: dict + attrs: + - variable: param + label: Parameter + schema: + type: string + required: true + - variable: value + label: Value + schema: + type: string + required: true + + - variable: resources + group: Resources Configuration + label: "" + schema: + type: dict + attrs: + - variable: limits + label: Limits + schema: + type: dict + attrs: + - variable: cpu + label: CPU + description: CPU limit for Rsync. + schema: + type: string + default: "4000m" + required: true + - variable: memory + label: Memory + description: Memory limit for Rsync. + schema: + type: string + default: "8Gi" + required: true diff --git a/community/rsyncd/1.0.0/templates/NOTES.txt b/community/rsyncd/1.0.0/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/community/rsyncd/1.0.0/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/community/rsyncd/1.0.0/templates/_configuration.tpl b/community/rsyncd/1.0.0/templates/_configuration.tpl new file mode 100644 index 0000000000..0e8c7f2efb --- /dev/null +++ b/community/rsyncd/1.0.0/templates/_configuration.tpl @@ -0,0 +1,62 @@ +{{- define "rsync.configuration" -}} +{{- include "rsync.validation" $ }} +configmap: + config: + enabled: true + data: + rsyncd.conf: | + port = {{ .Values.rsyncNetwork.rsyncPort }} + use chroot = yes + pid file = /tmp/rsyncd.pid + + max connections = {{ .Values.rsyncConfig.maxConnections }} + log file = /dev/stdout + + {{- range $aux := .Values.rsyncConfig.auxParams }} + {{ printf "%v = %v" $aux.param $aux.value }} + {{- end }} + + {{- $mods := list -}} + {{- range $mod := .Values.rsyncModules }} + {{- if $mod.enabled -}} + {{- include "rsync.module.validation" (dict "mod" $mod) }} + + {{ printf "[%v]" $mod.name }} + path = {{ printf "/data/%v" $mod.name }} + max connections = {{ $mod.maxConnections }} + uid = {{ $mod.uid }} + gid = {{ $mod.gid }} + {{- if $mod.comment }} + comment = {{ $mod.comment }} + {{- end }} + + {{- if eq $mod.accessMode "RO" }} + write only = false + read only = true + {{- else if eq $mod.accessMode "WO" }} + write only = true + read only = false + {{- else if eq $mod.accessMode "RW" }} + read only = false + write only = false + {{- end }} + + {{- if $mod.hostsAllow }} + hosts allow = {{ join " " $mod.hostsAllow }} + {{- end }} + + {{- if $mod.hostsDeny }} + hosts deny = {{ join " " $mod.hostsDeny }} + {{- end }} + {{- range $aux := $mod.auxParams }} + {{- include "rsync.aux.validation" (dict "aux" $aux) }} + {{ printf "%v = %v" $aux.param $aux.value }} + {{- end }} + {{- end }} + {{- $mods = mustAppend $mods $mod.name }} + {{- end }} + + {{- if not (deepEqual $mods (uniq $mods)) -}} + {{- fail "Rsync - Module Names must be unique" -}} + {{- end -}} +{{- end -}} diff --git a/community/rsyncd/1.0.0/templates/_rsync.tpl b/community/rsyncd/1.0.0/templates/_rsync.tpl new file mode 100644 index 0000000000..dccaf5b8f4 --- /dev/null +++ b/community/rsyncd/1.0.0/templates/_rsync.tpl @@ -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 -}} diff --git a/community/rsyncd/1.0.0/templates/_validation.tpl b/community/rsyncd/1.0.0/templates/_validation.tpl new file mode 100644 index 0000000000..da0c7a88dd --- /dev/null +++ b/community/rsyncd/1.0.0/templates/_validation.tpl @@ -0,0 +1,79 @@ +{{- define "rsync.validation" -}} + {{- $reservedParams := (list + "port" "use chroot" "pid file" + "max connections" "log file" + ) -}} + + {{- range .Values.rsyncConfig.auxParams -}} + {{- include "rsync.aux.validation" (dict "aux" .) -}} + + {{- if mustHas .param $reservedParams -}} + {{- fail (printf "Rsync - Overriding parameter [%v] is not allowed." .param) -}} + {{- end -}} + {{- end -}} + + {{- if not .Values.rsyncModules -}} + {{- fail "Rsync - At least one module must be configured." -}} + {{- end -}} +{{- end -}} + +{{- define "rsync.module.validation" -}} + {{- $mod := .mod -}} + {{- if not $mod.name -}} + {{- fail "Rsync - [Module Name] is required." -}} + {{- end -}} + + {{- if not (mustRegexMatch "^[a-zA-Z0-9]+([_-]*[a-zA-Z0-9]+)+$" $mod.name) -}} + {{- $allow := "Can include [Letters (a-z, A-Z), Numbers (0,9), Underscore (_), Dash (-)]" -}} + {{- $disallow := "But cannot start or end with [Underscore (_), Dash (-), Dot (.)]" -}} + {{- fail (printf "Rsync - Module Name [%v] has invalid naming format. %v %v" $mod.name $allow $disallow) -}} + {{- end -}} + + {{- if not $mod.hostPath -}} + {{- fail (printf "Rsync - [Host Path] on module [%v] is required." $mod.name) -}} + {{- end -}} + + {{- $modes := (list "RO" "RW" "WO") -}} + {{- if not (mustHas $mod.accessMode $modes) -}} + {{- fail (printf "Rsync - [Access Mode] must be one of [%v] on module [%v], but got [%v]." (join ", " $modes) $mod.name $mod.accessMode) -}} + {{- end -}} + + {{- if kindIs "invalid" $mod.maxConnections -}} + {{- fail (printf "Rsync - [Max Connections] on module [%v] is required." $mod.name) -}} + {{- end -}} + + {{- if kindIs "invalid" $mod.uid -}} + {{- fail (printf "Rsync - [User] on module [%v] is required." $mod.name) -}} + {{- end -}} + + {{- if kindIs "invalid" $mod.gid -}} + {{- fail (printf "Rsync - [Group] on module [%v] is required." $mod.name) -}} + {{- end -}} + + {{- range $entry := $mod.hostsAllow -}} + {{- if not $entry -}} + {{- fail (printf "Rsync - Entry [%v] in [Hosts Allow] on module [%v] cannot be empty." $entry $mod.name) -}} + {{- end -}} + {{- end -}} + + {{- range $entry := $mod.hostsDeny -}} + {{- if not $entry -}} + {{- fail (printf "Rsync - Entry [%v] in [Hosts Deny] on module [%v] cannot be empty." $entry $mod.name) -}} + {{- end -}} + {{- end -}} + + {{- range $mod.auxParams -}} + {{- include "rsync.aux.validation" (dict "aux" .) -}} + {{- end -}} +{{- end -}} + +{{- define "rsync.aux.validation" -}} + {{- $aux := .aux -}} + {{- if not $aux.param -}} + {{- fail "Rsync - Parameter name is required." -}} + {{- end -}} + + {{- if not $aux.value -}} + {{- fail (printf "Rsync - Value on parameter [%v] is required." $aux.param) -}} + {{- end -}} +{{- end -}} diff --git a/community/rsyncd/1.0.0/templates/common.yaml b/community/rsyncd/1.0.0/templates/common.yaml new file mode 100644 index 0000000000..d3b9e14111 --- /dev/null +++ b/community/rsyncd/1.0.0/templates/common.yaml @@ -0,0 +1,7 @@ +{{- include "ix.v1.common.loader.init" . -}} + +{{/* Merge the templates with Values */}} +{{- $_ := mustMergeOverwrite .Values (include "rsync.configuration" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "rsync.workload" $ | fromYaml) -}} + +{{- include "ix.v1.common.loader.apply" . -}} diff --git a/community/rsyncd/item.yaml b/community/rsyncd/item.yaml new file mode 100644 index 0000000000..2cd5084665 --- /dev/null +++ b/community/rsyncd/item.yaml @@ -0,0 +1,7 @@ +icon_url: https://rsync.samba.org/newrsynclogo.jpg +screenshots: [] +categories: + - storage +tags: + - sync + - file transferWhen application is installed, a container will be launched with root privileges.\nThis is required in order to apply the correct permissions to the
\nJellyfindirectories.\nAfterward, theJellyfincontainer will run as a non-root user (Default:568).\nAll mounted storage(s) will bechowned only if the parent directory does not match the configured user.