Skip to content

Commit

Permalink
flatcar: Run kubeadm after containerd
Browse files Browse the repository at this point in the history
Ensure kubeadm runs after containerd to avoid a race condition between
the two.

We intentionally add an After= directive and not a Requires= directive
to avoid breaking things for distros which use Ignition and don't use
containerd.

See kubernetes-sigs/image-builder#939.

Signed-off-by: Johanan Liebermann <[email protected]>
  • Loading branch information
johananl authored and k8s-infra-cherrypick-robot committed Sep 29, 2023
1 parent 1862e18 commit b4fc8ba
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/cluster-template-flatcar.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions templates/flavors/flatcar/machine-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
contents: |
[Unit]
After=oem-cloudinit.service
# kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939.
After=containerd.service
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
Expand Down
2 changes: 2 additions & 0 deletions templates/flavors/flatcar/patches/kubeadm-controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
contents: |
[Unit]
After=oem-cloudinit.service
# kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939.
After=containerd.service
# Workaround for https://github.com/kubernetes-sigs/cluster-api/issues/7679.
storage:
disks:
Expand Down
4 changes: 4 additions & 0 deletions templates/test/ci/cluster-template-prow-flatcar.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4fc8ba

Please sign in to comment.