Skip to content
New issue

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

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

Already on GitHub? Sign in 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

@stefanprodan stefanprodan added the backport:release/v2.2.x To be backported to release/v2.2.x label Dec 13, 2023
@hiddeco hiddeco merged commit 6c45df8 into main Dec 13, 2023
9 checks passed
@hiddeco hiddeco deleted the fix-no-match-err branch December 13, 2023 12:26
@fluxcdbot
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:release/v2.2.x To be backported to release/v2.2.x 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