Skip to content
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

Fix 'node-init' in GKE's 'cos' images. #739

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

bmcustodio
Copy link
Contributor

@bmcustodio bmcustodio commented Mar 3, 2022

Turns out that in GKE's cos images the containerd binary is still present even though /etc/containerd/config.toml is not. Hence, the kubelet wrapper would still be installed for these images according to the current check, even though it's not necessary. What's worse, starting the kubelet would fail because the sed command targeting the aforementioned file would fail.

This PR changes the check to rely on the presence of the --container-runtime-endpoint flag in the kubelet, which is probably a more reliable way of detecting *_containerd flavours and only applying the fix in these cases.

Turns out that in GKE's 'cos' images the 'containerd' binary is still
present even though '/etc/containerd/config.toml' is not. Hence, the
kubelet wrapper would still be installed for these images according to
the current check, even though it's not necessary. What's worse,
starting the kubelet would fail because the 'sed' command targeting the
aforementioned file would fail.

This PR changes the check to rely on the presence of the
'--container-runtime-endpoint' flag in the kubelet, which is probably a
more reliable way of detecting '*_containerd' flavours and only applying
the fix in these cases.

Signed-off-by: Bruno Miguel Custódio <[email protected]>
@bmcustodio bmcustodio temporarily deployed to ci March 3, 2022 11:00 Inactive
@bmcustodio
Copy link
Contributor Author

Marking as draft until cilium/cilium#19017 is reviewed and merged.

@bmcustodio bmcustodio marked this pull request as ready for review March 4, 2022 16:41
@bmcustodio bmcustodio requested a review from a team as a code owner March 4, 2022 16:41
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

🚢

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 4, 2022
@tklauser tklauser merged commit 9755b34 into cilium:master Mar 4, 2022
@bmcustodio bmcustodio deleted the pr/bruno/fix-gke-cos-node-init branch April 13, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants