From 0fb8f8bb90e797f85aa3bf6fdf3ba85ca8e41619 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Tue, 14 Sep 2021 23:59:19 +0200 Subject: [PATCH] fix: make sure autopermissions sets the group owner correctly (#994) * fix: make sure autopermissions sets the group owner correctly * add test fix --- charts/library/common-test/Chart.yaml | 2 +- charts/library/common/Chart.yaml | 5 +---- .../common/templates/lib/controller/_autopermissions.yaml | 2 +- charts/library/common/tests/persistentvolumeclaim_test.go | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/charts/library/common-test/Chart.yaml b/charts/library/common-test/Chart.yaml index 7e76be09cae..ae338891416 100644 --- a/charts/library/common-test/Chart.yaml +++ b/charts/library/common-test/Chart.yaml @@ -22,4 +22,4 @@ name: common-test sources: - https://github.com/truecharts/apps/tree/master/charts/library/common-test type: application -version: 3.1.1 +version: 3.1.2 diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index 4545ada2a4f..dce2bb66d9c 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -12,10 +12,7 @@ maintainers: - email: info@truecharts.org name: TrueCharts url: truecharts.org -- email: kjeld@schouten-lebbing.nl - name: Ornias1993 - url: truecharts.org name: common sources: null type: library -version: 7.0.13 +version: 7.0.14 diff --git a/charts/library/common/templates/lib/controller/_autopermissions.yaml b/charts/library/common/templates/lib/controller/_autopermissions.yaml index a9e2a61b064..424e9bb0bde 100644 --- a/charts/library/common/templates/lib/controller/_autopermissions.yaml +++ b/charts/library/common/templates/lib/controller/_autopermissions.yaml @@ -27,7 +27,7 @@ before chart installation. command: - "/bin/sh" - "-c" - - "echo 'Automatically correcting permissions...';{{ range $_, $hpm := $hostPathMounts }}chown -R {{ $group }} {{ $hpm.mountPath | squote }}; chmod -R g+w {{ $hpm.mountPath | squote }};{{ end }}" + - "echo 'Automatically correcting permissions...';{{ range $_, $hpm := $hostPathMounts }}chown -R :{{ $group }} {{ $hpm.mountPath | squote }}; chmod -R g+w {{ $hpm.mountPath | squote }};{{ end }}" volumeMounts: {{- range $name, $hpm := $hostPathMounts }} - name: {{ $name }} diff --git a/charts/library/common/tests/persistentvolumeclaim_test.go b/charts/library/common/tests/persistentvolumeclaim_test.go index de6a3021b08..a2fa5f89467 100644 --- a/charts/library/common/tests/persistentvolumeclaim_test.go +++ b/charts/library/common/tests/persistentvolumeclaim_test.go @@ -80,8 +80,8 @@ func (suite *PersistenceVolumeClaimTestSuite) TestMetaData() { "app.kubernetes.io/instance": "common-test", "app.kubernetes.io/managed-by": "Helm", "app.kubernetes.io/name": "common-test", - "app.kubernetes.io/version":"none", - "helm.sh/chart": "common-test-3.1.0", + "app.kubernetes.io/version":"latest", + "helm.sh/chart": "common-test-3.1.2", } tests := map[string]struct {