-
Notifications
You must be signed in to change notification settings - Fork 65
Conversation
Welcome @SataQiu! |
Hmm this linter is actually failing. I need to make an issue to look into that. In the meantime can you run |
OK, I will do that. Thanks @chuckha |
Ping me in a comment when this is passing and ready for review! sorry about the bad signal with CI, I don't know what's going on there. |
/lgtm |
/hold This is failing the verify scripts. |
This needs to be fixed. Automated tests are not catching this atm
|
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.
Background question:
Are we implementing init lock in this project because it is something really specific for kubeadm? (otherwise managing control plane init lock does not seem to be fitting in the scope of a bootstrap provider, that should be responsible for the cloud-init generation only ...)
} | ||
} | ||
|
||
func (l *controlPlaneInitLocker) Acquire(cluster *clusterv2.Cluster) bool { |
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.
Might be I'm missing something, but I don't see the counterpart of Acquire (Release)
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.
In the original codebase, the release part was done in the Cluster Actuator https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/master/pkg/cloud/actuators/cluster/actuator.go#L140-L159, we should move this as well
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.
Reconcile
is not complete yet. I think we can add this later. Right?
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.
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'll move it over when I need it in the actual usage of this code. no worries here.
@fabriziopandini This codebase originally solved the problem of generating multiple Kubeadm control-plane init configurations when a user would create an HA cluster submitting multiple Machine instances at the same time. I see how it may touch a little outside of its primary responsibility: generating cloud-init data. That said, without coordination, we might end up generating incorrect data. Happy to chat more in Zoom or on Slack if you want to talk more about it. /cc @ncdc |
Longer term, when we tackle control plane management (v1alpha3, perhaps), I'd expect this code to go away and be replaced by a new component that manages the full lifecycle of all control plane machines (init, scale up (join), scale down, upgrade, etc). |
Also, we need to orchestrate when the infrastructure provider is allowed to create a server:
|
I'm confused. Why did [*] Verifying whitespace...
[*] Verifying spelling...
[*] Verifying boilerplate...
[*] Verifying gofmt...
[*] Verifying golint...
[*] Verifying govet...
[*] Verifying deps...
[*] Verifying gotest...
[*] Verifying build...
All verify checks passed, congrats! |
/test pull-cluster-api-bootstrap-provider-kubeadm-verify |
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 think this is fine for now, I'll need this soon so I can do cleanups if necessary
I will probably be moving this to some directory other than controllers
.
/lgtm
return true | ||
} | ||
|
||
func (l *controlPlaneInitLocker) Release(cluster *clusterv2.Cluster) bool { |
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.
interesting, golint doesn't fail this, presumably because controlPlaneInitLocker is not exported.
} | ||
} | ||
|
||
func (l *controlPlaneInitLocker) Acquire(cluster *clusterv2.Cluster) bool { |
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'll move it over when I need it in the actual usage of this code. no worries here.
/hold cancel whoops, ignore the lgtm, this already had lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha, SataQiu 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 |
Thank you @SataQiu for your first PR into CABPK! Welcome aboard :) 🚂 🚀 |
What this PR does / why we need it:
Move control plane locker from CAPA
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 #29
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: