-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Cleanup nodelocaldns configuration #11238
Cleanup nodelocaldns configuration #11238
Conversation
Welcome @evan-a-a! |
Hi @evan-a-a. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: evan-a-a The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Use Corefile.base so that nodelocaldns supports templating
* Add label kubernetes.io/cluster-service: "true" * Set k8s-app label to node-local-dns
* Since we configure the upstream server through ansible templating, this arugment has no impact on node-cache
27204ea
to
c6d9c16
Compare
@@ -42,9 +43,7 @@ spec: | |||
- -localip | |||
- {{ nodelocaldns_ip }} | |||
- -conf | |||
- /etc/coredns/Corefile | |||
- -upstreamsvc |
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.
why removing the upstreamsvc?
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 explain this in the commit message, but this is a no-op in the Kubespray configuration, since we use Ansible to template the Corefile. The sole purpose of upstreamsvc is to replace __PILLAR__CLUSTER__DNS__
during templating from Corefile.base
with the IP of the upstream service.
- /etc/coredns/Corefile | ||
- -upstreamsvc | ||
- coredns | ||
- /etc/Corefile |
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.
how is this file configured ?
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.
Node-cache generates the Corefile from Corefile.base, substituting any templated values in the process.
@@ -97,7 +96,7 @@ spec: | |||
name: nodelocaldns | |||
items: | |||
- key: Corefile | |||
path: Corefile | |||
path: Corefile.base |
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.
Corefile.base doesn't seem used anywhere
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.
Ref #11238 (comment)
Hi, |
This PR will make more sense in the context of a future PR I'm preparing to properly configure nodelocaldns when using cilium as the CNI. I decided to break out some of the cleanup stuff separately since it wasn't directly related. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@@ -4,7 +4,8 @@ metadata: | |||
name: nodelocaldns | |||
namespace: kube-system | |||
labels: | |||
k8s-app: kube-dns | |||
k8s-app: node-local-dns | |||
kubernetes.io/cluster-service: "true" |
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 think that label is deprecated. (I don't find direct reference, but see kubernetes/kubernetes#72757
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR makes some minor cleanups to the node local dns config. Notably, it aligns the labels with the kubernetes sample configuration and enables the use of templating values in the Corefile.
Does this PR introduce a user-facing change?: