We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07a13c7 commit 7ca7ce4Copy full SHA for 7ca7ce4
1 file changed
tests/PSS_enable.sh
@@ -14,7 +14,9 @@ NAMESPACES=("istio-system" "auth" "cert-manager" "oauth2-proxy" "kubeflow" "knat
14
echo "Applying PSS $PSS_LEVEL to: ${NAMESPACES[*]}"
15
16
for NAMESPACE in "${NAMESPACES[@]}"; do
17
- kubectl get namespace "$NAMESPACE" >/dev/null 2>&1
+ if ! kubectl get namespace "$NAMESPACE" >/dev/null 2>&1; then
18
+ continue
19
+ fi
20
21
PATCH_OUTPUT=$(kubectl label namespace "$NAMESPACE" "pod-security.kubernetes.io/enforce=$PSS_LEVEL" --overwrite 2>&1)
22
if echo "$PATCH_OUTPUT" | grep -q "violate the new PodSecurity"; then
0 commit comments