Skip to content

⚠️Add Status.ControlPlaneInitialized field #1331

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

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

vincepri
Copy link
Member

Signed-off-by: Vince Prignano [email protected]

What this PR does / why we need it:

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 28, 2019
@vincepri vincepri changed the title Add Status.ControlPlaneInitialized field ✨Add Status.ControlPlaneInitialized field Aug 28, 2019
@vincepri vincepri changed the title ✨Add Status.ControlPlaneInitialized field ⚠️Add Status.ControlPlaneInitialized field Aug 28, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 28, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /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 Aug 28, 2019
@k8s-ci-robot k8s-ci-robot requested review from detiber and ncdc August 28, 2019 17:53
@vincepri
Copy link
Member Author

/assign @chuckha

@vincepri
Copy link
Member Author

We'll need to update the kubeadm provider as well to reflect this change

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.

world's tinies nit

lgtm otherwise

@vincepri vincepri force-pushed the add-cp-ready-field branch from 436733f to 0d2e5df Compare August 28, 2019 18:07
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 28, 2019
clusterPatch := client.MergeFrom(cluster.DeepCopy())
cluster.Annotations[v1alpha2.ClusterAnnotationControlPlaneReady] = "true"
cluster.Status.ControlPlaneInitialized = true
if err := r.Client.Patch(ctx, cluster, clusterPatch); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Is this patch something that we need to be doing here or should we be handling it with the deferred patch?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only place we're actually patching the Cluster, long term (v1alpha3) we might move this to another controller, but seems ok to be here for now to minimize changes

Copy link
Member Author

Choose a reason for hiding this comment

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

That said, I pushed an update to use patch.Helper util package :)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Oh, now I see that we are updating this as part of the Machine Controller... Should we be, though?

Copy link
Member Author

Choose a reason for hiding this comment

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

We shouldn't, but moving this logic to the Cluster controller is a major change, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should at least have an issue to track

Copy link
Member Author

Choose a reason for hiding this comment

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

@vincepri vincepri force-pushed the add-cp-ready-field branch from 0d2e5df to d69b905 Compare August 28, 2019 18:14
@detiber
Copy link
Member

detiber commented Aug 28, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit bd74699 into kubernetes-sigs:master Aug 28, 2019
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. 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.

Add a field on Cluster Status indicating the control plane is ready
4 participants