hjacobs / kube-janitor

Clean up (delete) Kubernetes resources after a configured TTL (time to live)
GNU General Public License v3.0
472 stars 40 forks source link

--include-namespaces=kube-system does not overwrite the default exclusion #13

Closed CookieComputing closed 5 years ago

CookieComputing commented 5 years ago

If I run --include-namespaces=kube-system without explicitly changes --exclude-namespaces, kube-janitor does not overwrite the exclusion. Is this by design, or should this be a change?

hjacobs commented 5 years ago

This is by design, I think "excludes" should have precedence (for safety reasons) --- you basically limit the namespaces by specifying --include-namespaces as the default is "all" (same as --include-namespaces=all). I would recommend that you only change --exclude-namespaces if you want to include kube-system (and all other namespaces).

hjacobs commented 5 years ago

I think we should make this behaviour more clear in the README, see #16