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

coreos-base/misc-files: Make Kubernetes work by default through symlink #1238

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

pothos
Copy link
Member

@pothos pothos commented Oct 9, 2023

In the past user had to customize Kubernetes or use a bind mount to make writing the default /usr/libexec/kubernetes/ path work. With systemd-sysext on by default the bind mount doesn't work anymore because it can get lost. A newer workaround is to use a systemd-sysext image that creates a symlink in /usr/libexec/... to redirect to somewhere under /var/.
Instead of relying on workarounds, make Kubernetes work by default on Flatcar by having the symlink be part of the generic image. The target folder will be created through a tmpfiles rule.

(The same paths are used as in flatcar/sysext-bakery#28)

How to use

Backport to Stable and maybe even LTS?

Testing done

Done:
Checked that the symlink exists under /usr and that the target dir is created by a tmpfile rule in base_image_var.conf (base_image_var.conf:d /var/kubernetes/kubelet-plugins/volume/exec 0755 root root - -)

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

In the past user had to customize Kubernetes or use a bind mount to make
writing the default /usr/libexec/kubernetes/ path work. With
systemd-sysext on by default the bind mount doesn't work anymore because
it can get lost. A newer workaround is to use a systemd-sysext image
that creates a symlink in /usr/libexec/... to redirect to somewhere
under /var/.
Instead of relying on workarounds, make Kubernetes work by default on
Flatcar by having the symlink be part of the generic image. The target
folder will be created through a tmpfiles rule.
@pothos pothos merged commit 8bdba80 into main Oct 10, 2023
1 check failed
@pothos pothos deleted the kai/k8s-libexec branch October 10, 2023 10:56
pothos added a commit that referenced this pull request Oct 10, 2023
coreos-base/misc-files: Make Kubernetes work by default through symlink
@pothos
Copy link
Member Author

pothos commented Oct 10, 2023

Backported to Stable, but LTS doesn't have the "misc" ebuild… Should I place it in coreos-init instead?

@github-actions
Copy link

github-actions bot commented Oct 10, 2023

Build action triggered: https://github.com/flatcar/scripts/actions/runs/6469635850

@krnowak
Copy link
Member

krnowak commented Oct 10, 2023

Backported to Stable, but LTS doesn't have the "misc" ebuild… Should I place it in coreos-init instead?

Sure.

@pothos
Copy link
Member Author

pothos commented Oct 10, 2023

Ok, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants