-
Notifications
You must be signed in to change notification settings - Fork 49
Fix self-hosted kubelet on bare metal platform #436
Fix self-hosted kubelet on bare metal platform #436
Conversation
fe36593
to
f2f58a2
Compare
d7d8b0f
to
1e2e08d
Compare
1e2e08d
to
dcebfdc
Compare
dcebfdc
to
af2e06d
Compare
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.
A small nit but LGTM after that.
So in the end we're not using the new Terraform modules here?
assets/lokomotive-kubernetes/bare-metal/flatcar-linux/kubernetes/cl/controller.yaml.tmpl
Show resolved
Hide resolved
assets/lokomotive-kubernetes/bare-metal/flatcar-linux/kubernetes/cl/controller.yaml.tmpl
Show resolved
Hide resolved
No, because it changes 10 other things, it seems too much of a burden for me. I created the issues for all those things instead. You can see those changes here though: https://github.com/kinvolk/lokomotive/compare/invidian/bare-metal-fix-self-hosted-kubelet-backup?expand=1 |
af2e06d
to
5e2a72e
Compare
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.
LGTM.
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.
TL;DR: lgtm
In principle I agree with @rata, I value more consistency especially if it's exposed to the user.
However, I see that we now have:
- Packet: string
- AWS: nothing
- AKS: map[string]string
- bare-metal (this PR): []string
So even if we choose string
we won't be consistent across platforms. So I don't mind either way in this PR, but with #489 we should make these consistent.
I'd change it to |
00d9ae9
to
2e5f1c9
Compare
@iaguis I implemented the test, please have a look. |
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.
A nit and a question.
To be able to test fix for #376 in the CI and to make sure we don't make a regression there. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Now we have some baremetal e2e tests, so they should be built and linted as part of the CI process. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit adds 'configure-kubelet-cgroup-driver' script to bare-metal nodes, which is then executed before kubelet systemd unit starts to generate kubelet configuration file with automatically detected cgroup driver to be used by kublelet. This allows to use FCL Edge channel on bare metal nodes, as Edge channel has different default cgroup driver than kubelet. Generating mentioned configuration file also fixes crashing self-hosted kubelet on bare metal platform, as it expects the file to be present on host filesystem. This feature is already implemented in the same way on other platforms. Closes #376. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This is required for self-hosted kubelet tests to pass as well. Part of #376. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Part of #376. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit disables self-hosted kubelet tests for picking up correct node labels, as it is flaky because of runc bug in current release of Flatcar stable, which makes kubelet pod to never terminate when the pod is scheduled for removal. Once the fix of runc reaches Flatcar stable, this test should be re-enabled. See also #110 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So the template syntax is checked by unit tests. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit changes the template method we use in baremetal Terraform code responsible for generating workers Ignition configs from template_file data source coming from 3rd party Terraform provider to built-in 'templatefile' function, which is available from Terraform 0.12, as it provides the exact same functionality, but do not require downloading 3rd party provider. Also 'template' provider recommends using this function: https://www.terraform.io/docs/providers/template/d/file.html. This also allows passing parameters to the template in complex types (like lists) and call functions like 'join' inside the template, which better separates data from how they are rendered. Part of #196 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Part of #440. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Now that we don't run disruptive test for self-hosted kubelet, we should have a test, that the labels configured by the user for the worker pool are actually applied on the node objects. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
ff236ce
to
6a2c4a8
Compare
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.
lgtm
This PR fixes crashing self-hosted kubelet DaemonSet on bare metal and enables the tests for it on this platform, to make sure that it is actually fixed.
The PR use newly introduced Terraform modules from PR #392, to avoid the differences between the Ignition configuration across platforms, which caused this exact bug.
Closes #376