An admission webhook that prevents the creation of specified namespaces
- with latest
oc
:oc cluster up --version=latest --loglevel=1
, then pay attention, you have a small window. You will see a message scroll acrossI1016 11:32:41.564270 4498 helper.go:585] Copying OpenShift config to local directory /tmp/openshift-config506467289
. You need to save that temp dir!cp -r /tmp/openshift-config506467289 /tmp/foo
- clone this repo
make build-image
oc create namespace openshift-namespace-reservation
oc process -f artifacts/install/rbac-template.yaml | oc auth reconcile -f -
oc process -f artifacts/install/apiserver-template.yaml -p "SERVICE_SERVING_CERT_CA=`cat '/tmp/foo/master/service-signer.crt' | base64``" | oc apply -f -
oc create -f artifacts/example/reserve-deads.yaml
will reserve thedeads
namespace.oc new-project deads
should produce "Error from server (Forbidden): "deads" is reserved"