-
Notifications
You must be signed in to change notification settings - Fork 1.4k
⚠️ Change remote.NewClusterClient to return a controller-runtime client.Client #1633
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
Conversation
|
Hi @noamran. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
ncdc
left a comment
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.
Looking great, thanks! Please run gofmt and goimports 😄
|
/ok-to-test |
eb544c4 to
d506c93
Compare
chuckha
left a comment
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.
Lovely
/approve
Thanks for including the changes for v1alpha2 to v1alpha3 😄
/assign @vincepri
for lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha, noamran 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 |
vincepri
left a comment
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.
This looks great! Some comments around the use of Scheme, and a note about the logic to use the local cluster client given that the Cluster resource is required in v1alpha3
controllers/machine_controller.go
Outdated
| func (r *MachineReconciler) deleteNode(ctx context.Context, cluster *clusterv1.Cluster, name string) error { | ||
| logger := r.Log.WithValues("machine", name) | ||
|
|
||
| var c client.Client |
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.
| var c client.Client | |
| c := r.Client |
and then change the if condition to overwrite this value if the cluster isn't nil, removing the need of an else
controllers/machineset_status.go
Outdated
| } | ||
|
|
||
| func (r *MachineSetReconciler) getMachineNode(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*corev1.Node, error) { | ||
| var c client.Client |
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.
Same suggestion as above to simplify these lines
|
Could you also please update
|
|
FYI @akutz @andrewsykim @rudoi @CecileRobertMichon @juan-lee @michaelgugino, this is a small (but positive!) breaking API change to the |
fa930d5 to
311492d
Compare
chuckha
left a comment
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.
I don't see any more issues to address
/lgtm
|
/test pull-cluster-api-integration |
What this PR does / why we need it:
Updating the
remotepackage -ClusterClientinterface has been removed.remote.NewClusterClientnow returns asigs.k8s.io/controller-runtime/pkg/clientClient.Which issue(s) this PR fixes :
Fixes #1606