Open
Description
Hi,
I am trying to find a way for kubent
to skip checking already removed APIs (for example - PodSecurityPolicy on 1.25+ K8S clusters). From the the debug output, I see that it's trying to fetch the APIs, even when the cluster is already on 1.26.
11:01AM DBG Retrieving: podsecuritypolicies.v1beta1.policy
11:01AM DBG Failed to retrieve: policy/v1beta1, Resource=podsecuritypolicies: the server could not find the requested resource
The reason for this, is that I use GKE and Recommender API will detect clients using deprecated APIs. It will then stop auto-upgrading clusters until no calls to removed or deprecated APIs are made for at least 30 days. Having a flag available, which would turn off calling these already removed API would be great help for me.
If you think it would be useful, I can try to make a PR if we work out some specification how it could work.
Thanks!