yogeshkk / K8sPurger

Hunt Unused Resources In Kubernetes
Apache License 2.0
254 stars 27 forks source link

showing default service accounts #14

Closed kotarusv closed 2 years ago

kotarusv commented 3 years ago

We use Openshift clusters. Every project in Openshift has 4 default service accounts. More importantly, default service account is being used at run time. The script is showing they are used or not referred to. This showing large output although they are used by PODS at run time. It is better to filter these default service accounts

Example

for service accounts | builder |velero | | default |velero | | deployer |velero

for secretes builder-dockercfg-f875f velero default-dockercfg-f6bzm velero deployer-dockercfg-qjwc7 velero

Even in a small cluster, the output is too verbose and showing lot of objects

yogeshkk commented 3 years ago

@kotarusv

Agreed we should skip default SA will think and implement solution. It will take bit time as much occupied. In secret is that "builder-dockercfg-f875f" is that docker pull secret? becaue I am excluding token and certificate I think we should exclude docker pull secret also.

yogeshkk commented 2 years ago

@kotarusv

Took way to much time because of other commitment but finally fixed issue in latest release