[bitnami/apisix] Skip check-no-capabilities test when securityContext disabled (#18469)

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
Miguel Ruiz
2023-08-24 10:56:04 +02:00
committed by GitHub
parent 4abb1f9459
commit b5231c4e91

View File

@@ -94,6 +94,7 @@ command:
# or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
exit-status: 0
{{- if .Vars.dataPlane.containerSecurityContext.enabled }}
check-no-capabilities:
exec: cat /proc/1/status
exit-status: 0
@@ -103,6 +104,7 @@ command:
- "CapEff: 0000000000000000"
- "CapBnd: 0000000000000000"
- "CapAmb: 0000000000000000"
{{- end }}
{{ if .Vars.dataPlane.serviceAccount.automountServiceAccountToken }}
check-sa:
exec: cat /var/run/secrets/kubernetes.io/serviceaccount/token | cut -d '.' -f 2 | xargs -I '{}' echo '{}====' | fold -w 4 | sed '$ d' | tr -d '\n' | base64 -d