diff --git a/library/common-test/tests/addons/autoperms_test.yaml b/library/common-test/tests/addons/autoperms_test.yaml index fcd0597ef..5fc3474f3 100644 --- a/library/common-test/tests/addons/autoperms_test.yaml +++ b/library/common-test/tests/addons/autoperms_test.yaml @@ -69,14 +69,6 @@ tests: chmod: 770 recursive: true mountPath: /test7 - test8: - enabled: true - type: pvc - autoPermissions: - chown: true - chmod: 770 - recursive: true - mountPath: /test8 test9: enabled: true type: nfs @@ -149,13 +141,6 @@ tests: content: name: test7 emptyDir: {} - - documentIndex: *jobDoc - contains: - path: spec.template.spec.volumes - content: - name: test8 - persistentVolumeClaim: - claimName: release-name-common-test-test8 - documentIndex: *jobDoc contains: path: spec.template.spec.volumes @@ -212,13 +197,6 @@ tests: name: test7 mountPath: /mounts/test7 readOnly: false - - documentIndex: *jobDoc - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: test8 - mountPath: /mounts/test8 - readOnly: false - documentIndex: *jobDoc contains: path: spec.template.spec.containers[0].volumeMounts @@ -313,19 +291,6 @@ tests: echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test7)]" echo "" - echo "Automatically correcting permissions for /mounts/test8..." - before=$(stat -c "%a" /mounts/test8) - chmod -$ 770 /mounts/test8 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" - echo "Permissions after: [$(stat -c "%a" /mounts/test8)]" - echo "" - echo "Automatically correcting ownership for /mounts/test8..." - before=$(stat -c "%u:%g" /mounts/test8) - chown -$ -f :568 /mounts/test8 || echo "Failed setting ownership using chown..." - - echo "Ownership before: [$before]" - echo "Ownership after: [$(stat -c "%u:%g" /mounts/test8)]" - echo "" echo "Automatically correcting ownership for /mounts/test9..." before=$(stat -c "%u:%g" /mounts/test9) chown -f :568 /mounts/test9 || echo "Failed setting ownership using chown..." @@ -345,6 +310,8 @@ tests: podSpec: {} ixChartContext: some: context + ixVolumes: + - hostPath: /mnt/pool/ix-applications/test persistence: test1: enabled: true @@ -406,7 +373,8 @@ tests: mountPath: /test7 test8: enabled: true - type: pvc + type: ixVolume + datasetName: test autoPermissions: chown: true chmod: 770 @@ -489,8 +457,8 @@ tests: path: spec.template.spec.volumes content: name: test8 - persistentVolumeClaim: - claimName: release-name-common-test-test8 + hostPath: + path: /mnt/pool/ix-applications/test - documentIndex: *jobDoc contains: path: spec.template.spec.volumes @@ -687,7 +655,7 @@ tests: chown: true asserts: - failedTemplate: - errorMessage: Auto Permissions - Allowed persistent types for auto permissions are [hostPath, pvc, emptyDir, nfs, ixVolume], but got [device] on [test] + errorMessage: Auto Permissions - Allowed persistent types for auto permissions are [hostPath, emptyDir, nfs, ixVolume], but got [device] on [test] - it: should fail trying to set permissions on readOnly set: @@ -700,7 +668,8 @@ tests: persistence: test: enabled: true - type: pvc + type: hostPath + hostPath: /test readOnly: true autoPermissions: chmod: 770 diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index cca8bf4d7..182423a35 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 12.14.2 +version: 12.14.3 diff --git a/library/common/templates/lib/util/_autoperms.tpl b/library/common/templates/lib/util/_autoperms.tpl index 4ebbfc92e..69261db82 100644 --- a/library/common/templates/lib/util/_autoperms.tpl +++ b/library/common/templates/lib/util/_autoperms.tpl @@ -1,7 +1,7 @@ {{/* Contains the auto-permissions job */}} {{- define "tc.v1.common.lib.util.autoperms" -}} -{{- $permAllowedTypes := (list "hostPath" "pvc" "emptyDir" "nfs" "ixVolume") -}} +{{- $permAllowedTypes := (list "hostPath" "emptyDir" "nfs" "ixVolume") -}} {{/* If you change this path, you must change it under _volumeMounts.tpl too*/}} {{- $basePath := "/mounts" -}}