Closed safanaj closed 4 years ago
Could you describe the use-case for this change?
The purpose of this changes is to allow the cleanup operator to delete also pods that were created directly using the kind: Pod
so that are no higher level controller like Job,ReplicaSet ... that owns it.
I need this changes because where I work we are creating "raw" pods through a "controller/manager" that is not a proper controller in k8s.
Am I clear in the purpose of this change?
I see what you want. But unless I'm missing something, with your change orphaned pods are going to be deleted immediately after creating. Also, why can't you delete the pod using the same system you use to create? Unmanaged pods have unique name so your external system should be able to delete it by name.
Pod Eviction is now supported in v0.7.0, could you give it a try? Make sure to run it with -legacy-mode=false to be able to use arguments.
This would allow the cleanup operator to remove also pods that have no OwnerReferences like a "raw" Pod deployed.