Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Fix controlplane components order#937

Merged
knrt10 merged 2 commits intomasterfrom
knrt10/update-controlplane-components-order
Sep 11, 2020
Merged

Fix controlplane components order#937
knrt10 merged 2 commits intomasterfrom
knrt10/update-controlplane-components-order

Conversation

@knrt10
Copy link
Contributor

@knrt10 knrt10 commented Sep 10, 2020

Also, added test to check the order

knrt10 added 2 commits September 10, 2020 15:20
Closes #918

Signed-off-by: knrt10 <kautilya@kinvolk.io>
Signed-off-by: knrt10 <kautilya@kinvolk.io>
@knrt10 knrt10 requested review from invidian and surajssd September 10, 2020 09:52
@knrt10 knrt10 linked an issue Sep 10, 2020 that may be closed by this pull request
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

Make sense

func TestCommonControlPlaneChartsOrder(t *testing.T) {
expectedOrder := []string{"pod-checkpointer", "kube-apiserver", "kubernetes", "calico", "lokomotive", "bootstrap-secrets"} //nolint:lll

commonControlPlaneCharts := platform.CommonControlPlaneCharts()
Copy link
Member

Choose a reason for hiding this comment

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

Hooking on platform.CommonControlPlaneCharts is not the ideal place to check that, as the order may still be mangled by appending to the slice or even randomized before applying, but I think it's better than nothing.

Copy link
Member

Choose a reason for hiding this comment

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

I understand that new charts might be appended in the list. Like it is don for kubelet chart. But I don't know if the order will change as you say so. I see it is all ordered from there on.

Copy link
Member

Choose a reason for hiding this comment

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

The point is, we do not check right before the applying, so it still can be mangled somewhere.

}

func TestCommonControlPlaneChartsOrder(t *testing.T) {
expectedOrder := []string{"pod-checkpointer", "kube-apiserver", "kubernetes", "calico", "lokomotive", "bootstrap-secrets"} //nolint:lll
Copy link
Member

Choose a reason for hiding this comment

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

Topic for other issue probably, but most likely bootstrap-secrets should be applied even before pod-checkpointer, so nodes can join the cluster for pod-checkpointer to converge.

Copy link
Member

Choose a reason for hiding this comment

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

If we check if the worker nodes are up before applying bootstrap-secrets it will still fail.

Copy link
Member

Choose a reason for hiding this comment

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

I know, but that's a separate issue :)

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

LGTM

@knrt10 knrt10 merged commit ee24a63 into master Sep 11, 2020
@knrt10 knrt10 deleted the knrt10/update-controlplane-components-order branch September 11, 2020 06:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"lokoctl cluster apply" updates controlplane components in wrong order

3 participants