fix: Ignore non-served CRD versions in discovery#2940
fix: Ignore non-served CRD versions in discovery#2940boomer41 wants to merge 1 commit intokubernetes:mainfrom
Conversation
When an API version is still available, but not served by the API server, any usage of that will result in errors. Thus, ignore the CRD versions that are not served.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: boomer41 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
This issue is currently awaiting triage. If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @boomer41! |
What this PR does / why we need it:
When an API version is still available, but not served by the API server, any usage of that will result in errors.
Thus, ignore the CRD versions that are not served.
This happened with ExternalSecrets.
It still adds v1beta1 to the CRD definition, but sets it as non-stored and non-served.
If you have the version for Kube State Metrics set to
*, it will repeatedly fail with the following message:How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
It removes CRD versions from the discovery which are not served by the API server (and any request will fail), but still defined in the CRD.
Which issue(s) this PR fixes: (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged)Fixes #