Custom operator for when a k8s namespace is being deleted (in Terminating State) #495
-
Hello, is there a suggested way to write a custom operator for when a k8s namespace is being deleted (in Terminating State)? Our use case is that we need to run the solution as described below whenever a namespace is being deleted
I think we'll start trying the following: https://buehler.github.io/dotnet-operator-sdk/docs/entities.html#ignoring-entities
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @gojanpaolo The normal namespace resource is already defined in the Kubernetes library. public class NsCtrl : IResourceController<V1Namespace>
{
} |
Beta Was this translation helpful? Give feedback.
Hey @gojanpaolo
The normal namespace resource is already defined in the Kubernetes library.
You can use the
V1Namespace
(IIRC it is called so) and then create a controller for that resource: