-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
✨ clusterctl: Suppress "finalizer name" API warnings in "move" command #11173
✨ clusterctl: Suppress "finalizer name" API warnings in "move" command #11173
Conversation
Skipping CI for Draft Pull Request. |
I've created this is a draft PR, because this might not be the implementation we want. Other options to consider:
/cc @sbueringer |
/area clusterctl |
Per feedback in #11065 (comment), I'll implement a warning handler that can hide specific warnings, and use it here. We'll also be able to use it to address #11065. |
f5d8e10
to
2019928
Compare
This now depends on #11179. I'll keep it as a draft until that is merged. |
ad1b622
to
1be7d4a
Compare
I'll take a look once rebased (merging the other PR right now) |
1be7d4a
to
1c932b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit
Move all handlers to one file, expressions to another
Allow user to choose which warnings to hide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit from my side
/test pull-cluster-api-e2e-main (to verify via e2e test artifacts) |
…messages Make return value easier to consume
Add LogAllHandler for consistent prefix, and DiscardAllHandler for convenience
I realized that we showed a different log message prefix ( |
Output examples Default (hide only some warnings)
Note we log warnings not related to the finalizer name. Hide no warnings
Hide all warnings
|
Perfect! Thank you very much :) /lgtm |
LGTM label has been added. Git tree hash: f85436577430959ac6d6c34a26e3c2ccff1b0d4a
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
As described in #10932, the
move
command shows, when talking to Kubernetes 1.29.0 or newer, API server warnings related to Cluster API's finalizer names. These are shown at the default verbosity; in fact, verbosity cannot hide them at the moment.This PR adds the flag
--hide-api-warnings
to themove
command. By default, the flag is set to true, so API warnings are hidden. The user can reveal warnings by setting the flag to false.Here is an example of the
move
command output with the flag set to false; this is equivalent to the output prior to this PR:And here is an example with the flag set to true; this is the default behavior in this PR:
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 #
/area clusterctl