Skip to content

Conversation

@noamran
Copy link
Contributor

@noamran noamran commented Oct 23, 2019

What this PR does / why we need it:
Updating the remote package -

  • The ClusterClient interface has been removed.
  • remote.NewClusterClient now returns a sigs.k8s.io/controller-runtime/pkg/client Client.

Which issue(s) this PR fixes :
Fixes #1606

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 23, 2019
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 23, 2019
Copy link
Contributor

@ncdc ncdc left a 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 😄

@ncdc
Copy link
Contributor

ncdc commented Oct 23, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 23, 2019
@ncdc ncdc added this to the v0.3.0 milestone Oct 23, 2019
@noamran noamran force-pushed the 1606 branch 3 times, most recently from eb544c4 to d506c93 Compare October 25, 2019 00:42
@noamran noamran changed the title [WIP] ⚠️ Change remote.NewClusterClient to return a controller-runtime client.Client ⚠️ Change remote.NewClusterClient to return a controller-runtime client.Client Oct 25, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2019
Copy link
Contributor

@chuckha chuckha left a 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

@k8s-ci-robot
Copy link
Contributor

[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 /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 Oct 25, 2019
Copy link
Member

@vincepri vincepri left a 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

func (r *MachineReconciler) deleteNode(ctx context.Context, cluster *clusterv1.Cluster, name string) error {
logger := r.Log.WithValues("machine", name)

var c client.Client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

}

func (r *MachineSetReconciler) getMachineNode(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*corev1.Node, error) {
var c client.Client
Copy link
Member

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

@ncdc
Copy link
Contributor

ncdc commented Oct 29, 2019

Could you also please update

// TODO remove this when remote.NewClusterClient returns a client.Client
?

@ncdc
Copy link
Contributor

ncdc commented Oct 30, 2019

FYI @akutz @andrewsykim @rudoi @CecileRobertMichon @juan-lee @michaelgugino, this is a small (but positive!) breaking API change to the controllers/remote package for v0.3.x.

@noamran noamran force-pushed the 1606 branch 2 times, most recently from fa930d5 to 311492d Compare October 30, 2019 19:50
Copy link
Contributor

@chuckha chuckha left a 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2019
@chuckha
Copy link
Contributor

chuckha commented Nov 6, 2019

/test pull-cluster-api-integration

@k8s-ci-robot k8s-ci-robot merged commit 9b14be0 into kubernetes-sigs:master Nov 6, 2019
@noamran noamran deleted the 1606 branch January 9, 2020 18:09
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. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change remote.NewClusterClient to return a controller-runtime client.Client

5 participants