-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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: Set the kubelet --resolv-conf
flag conditionally on init
#64665
kubeadm: Set the kubelet --resolv-conf
flag conditionally on init
#64665
Conversation
/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.
/approve
Thanks @stealthybox 💯!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dixudx, luxas, stealthybox 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 |
[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process @dixudx @stealthybox @timothysc Pull Request Labels
|
/retest Review the full test history for this PR. Silence the bot with an |
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.
I won't block it but perhaps we can do an audit of warnings and checks past freeze.
@@ -72,8 +73,12 @@ func buildKubeletArgMap(nodeRegOpts *kubeadmapi.NodeRegistrationOptions, registe | |||
kubeletFlags["register-with-taints"] = strings.Join(taintStrs, ",") | |||
} | |||
|
|||
if pids, _ := procfs.PidOf("systemd-resolved"); len(pids) > 0 { | |||
// procfs.PidOf only returns an error if the regex is empty or doesn't compile, so we can ignore it |
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.
IMO - we should still emit a message as a breadcrumb to the user in case anything happens.
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
kubeadm init
detects if systemd-resolved is running and configures the kubelet to use a working resolv.conf.This patch also removes the warning message prompting manual user action for this configuration.
/area kubeadm
/area kubelet
/area dns
/kind bug
/priority important-soon
/sig cluster-lifecycle
/assign @timothysc
Which issue(s) this PR fixes
Fixes kubernetes/kubeadm#845
Special notes for your reviewer:
See the difference in
KUBELET_KUBEADM_ARGS
when running with this build and enabling the resolved daemon on Ubuntu 17.10:Release note: