Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Properly detect unsupported API errors #4476

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Properly detect unsupported API errors #4476

merged 1 commit into from
Dec 13, 2023

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 13, 2023

This can happen when Custom Resource Definitions do not exist on the cluster. For example, because only a subset of the Flux controllers are installed on the cluster.

Previously, the detection was based on a combination of error type and string matching. However, a more reliable (and maintained) apimeta.IsNoMatchError checker is available upstream. Making it less likely this suddenly stops to matching properly when Kubernetes changes things.

Fixes #4474

@hiddeco hiddeco added the bug Something isn't working label Dec 13, 2023
This can happen when Custom Resource Definitions do not exist on the
cluster. For example, because only a subset of the Flux controllers are
installed on the cluster.

Previously, the detection was based on a combination of error type and
string matching. However, a more reliable (and maintained)
`apimeta.IsNoMatchError` checker is available upstream. Making it less
likely this suddenly stops to matching properly when Kubernetes changes
things.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluxcdbot
Copy link
Member

Successfully created backport PR for release/v2.2.x:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flux CLI v2.2.0 reports errors for all missing resources
3 participants