Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Test removing labels from Namespace #866

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions scripts/gen-namespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@
set -ex

if [ -z "$OUT" ]; then
echo "Please set OUT"; exit 1
echo "Please set OUT"
exit 1
fi

if [ -z "$NAMESPACE" ]; then
echo "Please set NAMESPACE"; exit 1
echo "Please set NAMESPACE"
exit 1
fi

OUT_DIR=${OUT}/${NAMESPACE}

if [ ! -d ${OUT_DIR} ]; then
mkdir -p ${OUT_DIR}
mkdir -p ${OUT_DIR}
fi

# can share this for all the operators, won't get re-applied if it already exists
cat > ${OUT_DIR}/namespace.yaml <<EOF_CAT
cat >${OUT_DIR}/namespace.yaml <<EOF_CAT
apiVersion: v1
kind: Namespace
metadata:
name: ${NAMESPACE}
labels:
pod-security.kubernetes.io/enforce: privileged
security.openshift.io/scc.podSecurityLabelSync: "false"
EOF_CAT