Skip to content

Commit

Permalink
Updated to gatekeeper beta12 (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy authored Aug 4, 2020
1 parent 04751c4 commit f77d8c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _test/deploy-gatekeeper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
command -v oc &> /dev/null || { echo >&2 'ERROR: oc not installed - Aborting'; exit 1; }
command -v konstraint &> /dev/null || { echo >&2 'ERROR: konstraint not installed - Aborting'; exit 1; }

gatekeeper_version="v3.1.0-beta.11"
gatekeeper_version="v3.1.0-beta.12"

cleanup_gatekeeper_constraints() {
echo ""
Expand All @@ -26,7 +26,7 @@ deploy_gatekeeper() {
echo "Patching control-plane related namespaces so that OPA ignores them..."
for namespace in $(oc get namespaces -o jsonpath='{.items[*].metadata.name}' | xargs); do
if [[ "${namespace}" =~ openshift.* ]] || [[ "${namespace}" =~ kube.* ]] || [[ "${namespace}" =~ default ]]; then
oc patch namespace/${namespace} -p='{"metadata":{"labels":{"control-plane":"true"}}}'
oc patch namespace/${namespace} -p='{"metadata":{"labels":{"admission.gatekeeper.sh/ignore":"true"}}}'
else
# Probably a users project, so leave it alone
echo "Skipping: ${namespace}"
Expand Down

0 comments on commit f77d8c0

Please sign in to comment.