diff --git a/library/common-test/tests/addons/autoperms_test.yaml b/library/common-test/tests/addons/autoperms_test.yaml index 8e2162d61..9fb7fcfb5 100644 --- a/library/common-test/tests/addons/autoperms_test.yaml +++ b/library/common-test/tests/addons/autoperms_test.yaml @@ -249,13 +249,13 @@ tests: echo "Automatically correcting ownership and permissions..." echo "Automatically correcting permissions for /mounts/test1..." before=$(stat -c "%a" /mounts/test1) - chmod -$ 770 /mounts/test1 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test1 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test1)]" echo "" echo "Automatically correcting ownership for /mounts/test1..." before=$(stat -c "%u:%g" /mounts/test1) - chown -$ -f :568 /mounts/test1 || echo "Failed setting ownership using chown..." + chown -R -f :568 /mounts/test1 || echo "Failed setting ownership using chown..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test1)]" @@ -263,7 +263,7 @@ tests: echo "Automatically correcting permissions for /mounts/test2..." before=$(stat -c "%a" /mounts/test2) chmod 770 /mounts/test2 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test2)]" echo "" echo "Automatically correcting ownership for /mounts/test2..." @@ -276,7 +276,7 @@ tests: echo "Automatically correcting permissions for /mounts/test3..." before=$(stat -c "%a" /mounts/test3) chmod 770 /mounts/test3 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test3)]" echo "" echo "Automatically correcting ownership for /mounts/test4..." @@ -288,26 +288,26 @@ tests: echo "" echo "Automatically correcting permissions for /mounts/test6..." before=$(stat -c "%a" /mounts/test6) - chmod -$ 770 /mounts/test6 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test6 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test6)]" echo "" echo "Automatically correcting ownership for /mounts/test6..." before=$(stat -c "%u:%g" /mounts/test6) - chown -$ -f 1000:1000 /mounts/test6 || echo "Failed setting ownership using chown..." + chown -R -f 1000:1000 /mounts/test6 || echo "Failed setting ownership using chown..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test6)]" echo "" echo "Automatically correcting permissions for /mounts/test7..." before=$(stat -c "%a" /mounts/test7) - chmod -$ 770 /mounts/test7 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test7 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test7)]" echo "" echo "Automatically correcting ownership for /mounts/test7..." before=$(stat -c "%u:%g" /mounts/test7) - chown -$ -f :568 /mounts/test7 || echo "Failed setting ownership using chown..." + chown -R -f :568 /mounts/test7 || echo "Failed setting ownership using chown..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test7)]" @@ -593,13 +593,13 @@ tests: echo "Automatically correcting ownership and permissions..." echo "Automatically correcting permissions for /mounts/test1..." before=$(stat -c "%a" /mounts/test1) - chmod -$ 770 /mounts/test1 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test1 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test1)]" echo "" echo "Automatically correcting ownership for /mounts/test1..." before=$(stat -c "%u:%g" /mounts/test1) - /usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test1" -p "/mounts/test1" || echo "Failed setting ownership using winacl..." + /usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test1" -p "/mounts/test1" || echo "Failed setting ownership using winacl..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test1)]" @@ -607,7 +607,7 @@ tests: echo "Automatically correcting permissions for /mounts/test2..." before=$(stat -c "%a" /mounts/test2) chmod 770 /mounts/test2 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test2)]" echo "" echo "Automatically correcting ownership for /mounts/test2..." @@ -620,7 +620,7 @@ tests: echo "Automatically correcting permissions for /mounts/test3..." before=$(stat -c "%a" /mounts/test3) chmod 770 /mounts/test3 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test3)]" echo "" echo "Automatically correcting ownership for /mounts/test4..." @@ -632,39 +632,39 @@ tests: echo "" echo "Automatically correcting permissions for /mounts/test6..." before=$(stat -c "%a" /mounts/test6) - chmod -$ 770 /mounts/test6 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test6 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test6)]" echo "" echo "Automatically correcting ownership for /mounts/test6..." before=$(stat -c "%u:%g" /mounts/test6) - /usr/sbin/nfs4xdr_winacl -a chown -G 1000 -$ -c "/mounts/test6" -p "/mounts/test6" || echo "Failed setting ownership using winacl..." + /usr/sbin/nfs4xdr_winacl -a chown -G 1000 -r -c "/mounts/test6" -p "/mounts/test6" || echo "Failed setting ownership using winacl..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test6)]" echo "" echo "Automatically correcting permissions for /mounts/test7..." before=$(stat -c "%a" /mounts/test7) - chmod -$ 770 /mounts/test7 || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + chmod -R 770 /mounts/test7 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test7)]" echo "" echo "Automatically correcting ownership for /mounts/test7..." before=$(stat -c "%u:%g" /mounts/test7) - /usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test7" -p "/mounts/test7" || echo "Failed setting ownership using winacl..." + /usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test7" -p "/mounts/test7" || echo "Failed setting ownership using winacl..." 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]" + chmod -R 770 /mounts/test8 || echo "Failed setting permissions using chmod..." + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" /mounts/test8)]" echo "" echo "Automatically correcting ownership for /mounts/test8..." before=$(stat -c "%u:%g" /mounts/test8) - /usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test8" -p "/mounts/test8" || echo "Failed setting ownership using winacl..." + /usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test8" -p "/mounts/test8" || echo "Failed setting ownership using winacl..." echo "Ownership before: [$before]" echo "Ownership after: [$(stat -c "%u:%g" /mounts/test8)]" diff --git a/library/common-test/tests/ingress/stop_test.yaml b/library/common-test/tests/ingress/stop_test.yaml index 23e9266f0..642b26eab 100644 --- a/library/common-test/tests/ingress/stop_test.yaml +++ b/library/common-test/tests/ingress/stop_test.yaml @@ -97,8 +97,9 @@ tests: path: metadata.name value: test-release-name-common-test - documentIndex: *ingressDoc - isNull: + equal: path: spec.ingressClassName + value: null - documentIndex: *ingressDoc isSubset: path: metadata.annotations @@ -125,8 +126,9 @@ tests: path: metadata.name value: test-release-name-common-test - documentIndex: *ingressDoc - isNull: + equal: path: spec.ingressClassName + value: null - documentIndex: *ingressDoc isSubset: path: metadata.annotations diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index b3480ac86..b674476be 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 17.2.1 +version: 17.2.2 diff --git a/library/common/templates/class/_ingress.tpl b/library/common/templates/class/_ingress.tpl index fca2f1e9f..0e0841a36 100644 --- a/library/common/templates/class/_ingress.tpl +++ b/library/common/templates/class/_ingress.tpl @@ -54,9 +54,7 @@ metadata: {{- . | nindent 4 }} {{- end }} spec: - {{- if $ingressClassName }} - ingressClassName: {{ $ingressClassName }} - {{- end }} + ingressClassName: {{ $ingressClassName | default nil }} rules: {{- range $h := $objectData.hosts }} - host: {{ (tpl $h.host $rootCtx) | quote }} diff --git a/library/common/templates/lib/util/_autoperms.tpl b/library/common/templates/lib/util/_autoperms.tpl index 773b45c30..c77a77655 100644 --- a/library/common/templates/lib/util/_autoperms.tpl +++ b/library/common/templates/lib/util/_autoperms.tpl @@ -103,7 +103,7 @@ podSpec: {{- $r := "" -}} {{- if $vol.recursive -}} - {{- $r = "-$" -}} + {{- $r = "-R" -}} {{- end -}} {{/* Permissions */}} @@ -111,7 +111,7 @@ podSpec: echo "Automatically correcting permissions for {{ $mountPath }}..." before=$(stat -c "%a" {{ $mountPath }}) chmod {{ $r }} {{ $vol.chmod }} {{ $mountPath }} || echo "Failed setting permissions using chmod..." - echo "Permissions after: [$before]" + echo "Permissions before: [$before]" echo "Permissions after: [$(stat -c "%a" {{ $mountPath }})]" echo "" {{- end -}}