Closed pietervincken closed 4 years ago
@pietervincken, I added the -l
--selector
flag, Krew index was updated with the changes so you should be able to use it after executing kubectl krew upgrade
.
Cool. Thank you for the quick implementation! I'll try it out tomorrow!
As a developer I want to be able to add label selectors to the prune to limit the scope of the command In order to have more control over which secrets and configmaps get pruned.
Background
We use Kustomize and the configmapgenerator. It leaves behind quite a few unused configmaps, so using the plugin should help us a lot to mitigate this. However, the tool currently doesn't allow us to limit the prune to the configmaps that we are actively managing. We use some operators and one of those creates a configmap which is used by the operator directly through API calls and is not used in any other configuration. With labels, we could limit the prune to just the configmaps that are generated with Kustomize.