hjacobs/kube-janitor

--include-resources not working as expected

CookieComputing opened this issue · 1 comments

I've been having issues trying to get --include-resources to work as expected.

I tried two variants of this spec but didn't get anything to work:

spec:
      containers:
      - args:
        - --debug
        - --interval=20
        - --rules-file=/config/rules.yaml
        - --include-resources=deployment
spec:
      containers:
      - args:
        - --debug
        - --interval=20
        - --rules-file=/config/rules.yaml
        - --include-resources=deployment
        - --include-namespaces=default

I ran kubectl run temp-nginx --image=nginx and annotated it with kubectl annotate deploy temp-nginx janitor/ttl=5s, but the deployment doesn't disappear after a loop run. Any ideas on what to do?

That's a bit embarrassing; the issue was deployment instead of deployments. Likewise, it should be pods and not pod.