lwolf / kube-cleanup-operator

Kubernetes Operator to automatically delete completed Jobs and their Pods
MIT License
503 stars 109 forks source link

Deploy in several namespaces #18

Closed andrealmar closed 6 years ago

andrealmar commented 6 years ago

Hi,

Thanks for putting the effort in making this operator. It comes very handy. I have a question:

It is ok to affirm that I have to deploy the kube-cleanup-operatorin EACH namespace I have inside my cluster, right? Or there is a way to deploy the operator ONCE for ALL namespaces I have?

Thanks,

lwolf commented 6 years ago

Hi, Thanks, it's great to hear. Yes, you're correct, you have to deploy it in each namespace you want it to operate.

Currently, it's not possible to run it on cluster level, but it shouldn't be hard to add this functionality. I'll leave this ticket open to not forget (or may be somebody will submit a PR)

andrealmar commented 6 years ago

@lwolf I've made a test and I commented the line 26 of the deployment.yml and apparently it worked in ALL namespaces I have in my K8s cluster. All the jobs created in other namespaces I can see in the logs they've been deleted by the cleanup-operator. The only thing is that I had to deploy the cleanup-operator on my default namespace in order to make things work.

lwolf commented 6 years ago

Thanks for letting me know, I'll take a look at it and update either the code or docs to make it more clear.

lwolf commented 6 years ago

@andrealmar I double checked, deploying operator without specifying the namespace arg allow it to operate cluster wide. I updated the readme to make it clear. also, I just noticed the line at the beginning or the readme 😄

Some defaults:
* All Namespaces are monitored by default