fix(common): Just provide warning when chmod fails on autopermissions (#1157)
* fix(common): Just provide warning when chmod fails on autopermissions due to nfsv4acl's * single comma * tests * whoop * zucht
This commit is contained in:
committed by
GitHub
parent
6c64fd2c01
commit
f9c3530e36
@@ -15,4 +15,4 @@ maintainers:
|
||||
name: common
|
||||
sources: null
|
||||
type: library
|
||||
version: 8.3.9
|
||||
version: 8.3.10
|
||||
|
||||
@@ -22,7 +22,7 @@ before chart installation.
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
- "echo 'Automatically correcting permissions...';{{ if and ( .Values.addons.vpn.configFile.enabled ) ( not ( eq .Values.addons.vpn.type "disabled" )) }}chown -R 568:568 /vpn/vpn.conf; chmod -R g+w /vpn/vpn.conf;{{ end }}{{ range $_, $hpm := $hostPathMounts }}chown -R :{{ $group }} {{ $hpm.mountPath | squote }}; chmod -R g+w {{ $hpm.mountPath | squote }};{{ end }}"
|
||||
- "echo 'Automatically correcting permissions...';{{ if and ( .Values.addons.vpn.configFile.enabled ) ( not ( eq .Values.addons.vpn.type "disabled" )) }}chown -R 568:568 /vpn/vpn.conf; chmod -R g+w /vpn/vpn.conf || echo 'chmod failed for vpn config, are you running NFSv4 ACLs?';{{ end }}{{ range $_, $hpm := $hostPathMounts }}chown -R :{{ $group }} {{ $hpm.mountPath | squote }}; chmod -R g+w || echo 'chmod failed for {{ $hpm.mountPath }}, are you running NFSv4 ACLs?' {{ $hpm.mountPath | squote }};{{ end }}"
|
||||
volumeMounts:
|
||||
{{- if and ( .Values.addons.vpn.configFile.enabled ) ( not ( eq .Values.addons.vpn.type "disabled" )) }}
|
||||
- name: vpnconfig
|
||||
|
||||
@@ -131,7 +131,7 @@ class Test < ChartTest
|
||||
|
||||
it 'can process default (568:568) permissions for multiple volumes' do
|
||||
results= {
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w '/configlist';chown -R :568 '/data'; chmod -R g+w '/data';"]
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w || echo 'chmod failed for /configlist, are you running NFSv4 ACLs?' '/configlist';chown -R :568 '/data'; chmod -R g+w || echo 'chmod failed for /data, are you running NFSv4 ACLs?' '/data';"]
|
||||
}
|
||||
values = {
|
||||
persistenceList: [
|
||||
@@ -161,7 +161,7 @@ class Test < ChartTest
|
||||
|
||||
it 'outputs default permissions with irrelevant podSecurityContext' do
|
||||
results= {
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w '/configlist';chown -R :568 '/data'; chmod -R g+w '/data';"]
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w || echo 'chmod failed for /configlist, are you running NFSv4 ACLs?' '/configlist';chown -R :568 '/data'; chmod -R g+w || echo 'chmod failed for /data, are you running NFSv4 ACLs?' '/data';"]
|
||||
}
|
||||
values = {
|
||||
podSecurityContext: {
|
||||
@@ -192,7 +192,7 @@ class Test < ChartTest
|
||||
|
||||
it 'outputs fsgroup permissions for multiple volumes when set' do
|
||||
results= {
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :666 '/configlist'; chmod -R g+w '/configlist';chown -R :666 '/data'; chmod -R g+w '/data';"]
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :666 '/configlist'; chmod -R g+w || echo 'chmod failed for /configlist, are you running NFSv4 ACLs?' '/configlist';chown -R :666 '/data'; chmod -R g+w || echo 'chmod failed for /data, are you running NFSv4 ACLs?' '/data';"]
|
||||
}
|
||||
values = {
|
||||
podSecurityContext: {
|
||||
@@ -223,7 +223,7 @@ class Test < ChartTest
|
||||
|
||||
it 'outputs runAsUser permissions for multiple volumes when set' do
|
||||
results= {
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w '/configlist';chown -R :568 '/data'; chmod -R g+w '/data';"]
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w || echo 'chmod failed for /configlist, are you running NFSv4 ACLs?' '/configlist';chown -R :568 '/data'; chmod -R g+w || echo 'chmod failed for /data, are you running NFSv4 ACLs?' '/data';"]
|
||||
}
|
||||
values = {
|
||||
podSecurityContext: {
|
||||
@@ -254,7 +254,7 @@ class Test < ChartTest
|
||||
|
||||
it 'outputs fsGroup AND runAsUser permissions for multiple volumes when both are set' do
|
||||
results= {
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :666 '/configlist'; chmod -R g+w '/configlist';chown -R :666 '/data'; chmod -R g+w '/data';"]
|
||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :666 '/configlist'; chmod -R g+w || echo 'chmod failed for /configlist, are you running NFSv4 ACLs?' '/configlist';chown -R :666 '/data'; chmod -R g+w || echo 'chmod failed for /data, are you running NFSv4 ACLs?' '/data';"]
|
||||
}
|
||||
values = {
|
||||
podSecurityContext: {
|
||||
|
||||
Reference in New Issue
Block a user