-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Conversion of references should use a CR client #5160
🌱 Conversion of references should use a CR client #5160
Conversation
/assign @sbueringer @fabriziopandini |
2f42881
to
622289f
Compare
This changeset introduces some deprecations for functions that are still creating the metadata client through a restconfig each time the function is called. The controller runtime client supports retrieving metadata only objects; this change deprecates the old functions and creates new ones that use a CR client. Signed-off-by: Vince Prignano <[email protected]>
622289f
to
6c13858
Compare
This is a great cleanup, thanks! |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
I see it is merged but the comment in this line is using the wrong function name: https://github.com/kubernetes-sigs/cluster-api/blob/master/util/conversion/conversion.go#L57. It should be |
I expected the linter to pick this up. Looks like it does not. |
@ykakarap 🤔 I thought it'd have picked it up as well, we might want to see why |
I'll fix it in the somewhat related #5143 PR |
@vincepri @ykakarap I think it's because godot is per default only enabled on declarations: https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml#L259-L267 Unfortunately, we can't enable it for now everywhere because it panics somewhere in clusterctl: tetafro/godot#20 (comment) Sooner or later I'd like to fix godot so that we can enable it everywhere. |
I will open an issue to fix the godot lints everywhere in our codebase, following that we can enable godot everywhere. |
Signed-off-by: Vince Prignano [email protected]
What this PR does / why we need it:
This changeset introduces some deprecations for functions that are still
creating the metadata client through a restconfig each time the function
is called. The controller runtime client supports retrieving metadata
only objects; this change deprecates the old functions and creates new
ones that use a CR client.
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 #
/milestone v0.4