kubernetes-retired / cluster-api-bootstrap-provider-kubeadm

LEGACY REPO. NEW CODE IS https://github.com/kubernetes-sigs/cluster-api/tree/master/bootstrap/kubeadm
Apache License 2.0
62 stars 67 forks source link

🏃‍♂️ Add a test to ensure that exactly one control plane machine initializes if there are multiple control plane machines defined #221

Closed SataQiu closed 4 years ago

SataQiu commented 4 years ago

What this PR does / why we need it: Add a test to ensure that exactly one control plane machine initializes if there are multiple control plane machines defined

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Ref #214

chuckha commented 4 years ago

This looks great to me pending @neolit123's changes.

The fake lock is a little bit weird, would it be possible to always return true? a simpler implementation would be better, but if this is necessary for now then let's leave it.

SataQiu commented 4 years ago

This looks great to me pending @neolit123's changes.

The fake lock is a little bit weird, would it be possible to always return true? a simpler implementation would be better, but if this is necessary for now then let's leave it.

Thanks @chuckha I don't think the fake lock should always return true. Because only when the lock is unlocked can the initializing machine obtain the lock.

chuckha commented 4 years ago

/approve

thanks for the update this looks really good!

/assign @neolit123 for lgtm

k8s-ci-robot commented 4 years ago

[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: - ~~[OWNERS](https://github.com/kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm/blob/master/OWNERS)~~ [chuckha] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
SataQiu commented 4 years ago

ping @neolit123

SataQiu commented 4 years ago

Hi @ncdc Could you have a look at this? This PR has been around for a long time

neolit123 commented 4 years ago

/lgtm