lwolf / kube-cleanup-operator

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

Fix dry-run deletePods #47

Closed artem-zinnatullin closed 4 years ago

artem-zinnatullin commented 4 years ago

Ran the controller with --dry-run=true and it removed all the pods according to --delete flags…

2020/06/04 00:55:56 dry-run: Pod 'xxx:yyy-6020-l3y6qrco-22kx8' would have been deleted
2020/06/04 00:55:56 Deleting pod 'xxx:yyy-6020-l3y6qrco-22kx8'
$ kubectl get pod -n xxx yyy-6020-l3y6qrco-22kx8                                                                                               
Error from server (NotFound): pods "yyy-6020-l3y6qrco-22kx8" not found

No hard feelings, early returns are tricky 😬

lwolf commented 4 years ago

Apparently return got lost during refactoring. Thank you for PR