Skip to content

Commit

Permalink
Merge pull request #1458 from dduportal/feat/rsyncd/allow-data-subpath
Browse files Browse the repository at this point in the history
feat(rsyncd) allow specifying a sub directory for each component to mount (instead of the root)
  • Loading branch information
dduportal authored Nov 29, 2024
2 parents 762eeb3 + 29f17a5 commit af88df3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/rsyncd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: rsyncd helm chart for Kubernetes
name: rsyncd
version: 3.0.0
version: 3.1.0
maintainers:
- email: [email protected]
name: jenkins-infra-team
3 changes: 3 additions & 0 deletions charts/rsyncd/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ spec:
- name: datadir-{{ .name }}
mountPath: {{ .path }}
readOnly: {{ eq (toString .writeEnabled) "true" | ternary "false" "true" }}
{{- with .volumeSubDir }}
subPath: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.configuration.sshd }}
{{- if .Values.configuration.sshd.hostKeys }}
Expand Down
3 changes: 2 additions & 1 deletion charts/rsyncd/tests/custom_values_rsyncd_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ tests:
- equal:
path: spec.template.spec.containers[0].volumeMounts[6].mountPath
value: /tmp/hudson
- notExists:
- equal:
path: spec.template.spec.containers[0].volumeMounts[6].subPath
value: ./foo/
- equal:
path: spec.template.spec.containers[0].volumeMounts[6].readOnly
value: false
Expand Down
3 changes: 2 additions & 1 deletion charts/rsyncd/tests/custom_values_sshd_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ tests:
- equal:
path: spec.template.spec.containers[0].volumeMounts[3].mountPath
value: /tmp/hudson
- notExists:
- equal:
path: spec.template.spec.containers[0].volumeMounts[3].subPath
value: ./foo/
- equal:
path: spec.template.spec.containers[0].volumeMounts[3].readOnly
value: false
Expand Down
1 change: 1 addition & 0 deletions charts/rsyncd/tests/values/custom_rsyncd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ configuration:
path: /tmp/hudson
comment: "Hudson Read-Only Mirror"
volumeTpl: "another-vol"
volumeSubDir: ./foo/
writeEnabled: true
1 change: 1 addition & 0 deletions charts/rsyncd/tests/values/custom_sshd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ configuration:
path: /tmp/hudson
comment: "Hudson Read-Only Mirror"
volumeTpl: "another-vol"
volumeSubDir: ./foo/
writeEnabled: true

0 comments on commit af88df3

Please sign in to comment.