-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
kubeadm: always mount a flex volume path for the controller-manager #84468
kubeadm: always mount a flex volume path for the controller-manager #84468
Conversation
Checking if the path exists before creating the volume is problematic because the path will be created regardless after the initial call to "kubeadm init" and once the CM Pod is running. Then on subsequent calls to "kubeadm init" or the "control-plane" phase the manifest for the CM will be different. Always mount this path, but also consider the user provided flag override from ClusterConfiguration.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thank you @neolit123! /lgtm Other reviewers, feel free to unhold. |
/retest |
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
/hold cancel
In kubernetes#84468 we added a host path mount for a flex volume which is needed by the controller manager. We should pre-check if the path is write-able at all because the default path might be read-only. To do this, we now do an `os.MkdirAll` and propagate the error up to to the caller. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
What this PR does / why we need it:
Checking if the path exists before creating the volume is
problematic because the path will be created regardless
after the initial call to "kubeadm init" and once the CM Pod
is running.
Then on subsequent calls to "kubeadm init" or the "control-plane"
phase the manifest for the CM will be different.
Always mount this path, but also consider the user provided
flag override from ClusterConfiguration.
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1858
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/assign @ereslibre @yastij
/kind bug
/priority backlog