Prevent project deletion in OpenShift

8/27/2018

Is it possible to prevent project deletion in OpenShift?

I have some projects that must not be deleted. Sure I can recreate any projects that were accidentally deleted but there would still be an outage.

I've read through a lot of docs but haven't come across anything yet. Haven't found anything on preventing namespace deletion in Kubernetes either. I'm hoping I missed something.

-- Everett Toews
kubernetes
openshift

1 Answer

8/29/2018

You can prevent deletion by certain users but not deletion in general. A good starting point for Authorization in Openshift might be

https://docs.okd.io/3.9/architecture/additional_concepts/authorization.html

This means you should have a user or group of users who you trust to not delete a project by accident and ordinary user who create and destroy objects inside this project but can not destroy it by themself.

Hope this helps.

-- siavash9000
Source: StackOverflow