Skip to content

Commit 7ca7ce4

Browse files
committed
continue
Signed-off-by: kunal-511 <yoyokvunal@gmail.com>
1 parent 07a13c7 commit 7ca7ce4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/PSS_enable.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ NAMESPACES=("istio-system" "auth" "cert-manager" "oauth2-proxy" "kubeflow" "knat
1414
echo "Applying PSS $PSS_LEVEL to: ${NAMESPACES[*]}"
1515

1616
for NAMESPACE in "${NAMESPACES[@]}"; do
17-
kubectl get namespace "$NAMESPACE" >/dev/null 2>&1
17+
if ! kubectl get namespace "$NAMESPACE" >/dev/null 2>&1; then
18+
continue
19+
fi
1820

1921
PATCH_OUTPUT=$(kubectl label namespace "$NAMESPACE" "pod-security.kubernetes.io/enforce=$PSS_LEVEL" --overwrite 2>&1)
2022
if echo "$PATCH_OUTPUT" | grep -q "violate the new PodSecurity"; then

0 commit comments

Comments
 (0)