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

✨ clusterctl: Allow user to suppress API warnings #11149

Merged

Conversation

dlipovetsky
Copy link
Contributor

What this PR does / why we need it:
Allows the clusterctl user to configure the API client warning handler.

The warning handler is configured by the Proxy. If a user only wants to configure the warning handler, we should not require them to implement their own Proxy. This PR, therefore, exports our Proxy constructor, and adds an option that allows the user to construct a Proxy with their own warning handler.

The PR does not change the existing warning handling behavior. As before, the default warning handler is provided by the controller-runtime client. Its default warning warning handler has not changed.

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 #10932

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 6, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 6, 2024
@dlipovetsky
Copy link
Contributor Author

/cc @sbueringer

@dlipovetsky
Copy link
Contributor Author

I also have a commit that uses this to hide API warnings in the move command. I'll file a separate PR for that.

@dlipovetsky
Copy link
Contributor Author

/area clusterctl

@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl and removed do-not-merge/needs-area PR is missing an area label labels Sep 6, 2024
@sbueringer
Copy link
Member

Thx!

/lgtm
/assign @fabriziopandini

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 9, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f96dd35df5dc79f2bcc688d3e838b5c1b9f7fa59

@sbueringer
Copy link
Member

I also have a commit that uses this to hide API warnings in the move command

Maybe we should only hide specific warnings, but no strong opinion (+ let's discuss this on the next PR)

@sbueringer
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 11, 2024
@k8s-ci-robot k8s-ci-robot merged commit a08e4b4 into kubernetes-sigs:main Sep 11, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/clusterctl Issues or PRs related to clusterctl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option in the clusterctl library to suppress API server warnings
4 participants