-
Notifications
You must be signed in to change notification settings - Fork 4.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
NodeLocal DNSCache #8780
NodeLocal DNSCache #8780
Conversation
Hi @mazzy89. Thanks for your PR. I'm waiting for a kubernetes 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/test-infra repository. |
/ok-to-test My only thought on the new api fields is that it might be more intuitive to have an |
upup/models/cloudup/resources/addons/nodelocaldns.addons.k8s.io/k8s-1.12.yaml.template
Show resolved
Hide resolved
@rifelpet going to change the condition to |
/retest |
upup/models/cloudup/resources/addons/nodelocaldns.addons.k8s.io/k8s-1.12.yaml.template
Outdated
Show resolved
Hide resolved
The nodes start now, but ends up in this error: Is there any way of testing if this works? Like prometheus counters or something? |
I guess you are using it in I guess then we need to check if the |
Let me wire here a change and see if it works. |
Now I get
Could you maybe try to deploy a cluster with this before submitting the next commits? |
Unfortunately dont have anywhere where to test this change quickly |
37f80a7
to
9fa2ba6
Compare
Added unit tests here. It should now be easier to tests and make sure that the different scenarios are now covered. |
58fa846
to
36f8ab5
Compare
Ready here to be picked up for a review. |
36f8ab5
to
dfb725c
Compare
Signed-off-by: Salvatore Mazzarino <[email protected]>
Signed-off-by: Salvatore Mazzarino <[email protected]>
Signed-off-by: Salvatore Mazzarino <[email protected]>
dfb725c
to
d5019a6
Compare
/test pull-kops-e2e-kubernetes-aws |
Sorry to bother, but will it be possible to use this with Kops 1.15/1.16 and kubernetes v1.15 or this change is only for furutre 1.18 release? |
At the moment the change has been planned for kops 1.18 |
|
||
// @ check that NodeLocalDNS addon is configured correctly | ||
if c.Spec.KubeDNS.NodeLocalDNS != nil && c.Spec.KubeDNS.NodeLocalDNS.Enabled { | ||
if c.Spec.KubeDNS.Provider != "CoreDNS" { |
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.
Do we actually need the "raw" DNS provider to be CoreDNS? I didn't think it was required?
@@ -705,3 +714,9 @@ func validateKubelet(k *kops.KubeletConfigSpec, c *kops.Cluster, kubeletPath *fi | |||
} | |||
return allErrs | |||
} | |||
|
|||
func isExperimentalClusterDNS(k *kops.KubeletConfigSpec, dns *kops.KubeDNSConfig) bool { |
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.
Nit: I'm not clear why this function is called "isExperimentalClusterDNS". Maybe isValidClusterDNS
?
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.
It is just because when this one returns true, one needs the ExperimentalClusterDNS featureflag on. I am not really sure this feature flag makes sense. As in it doesn't really guard a feature.
One option would certainly be to remove the feature flag and only consider "valid" configurations.
// NodeLocalDNSConfig are options of the node-local-dns | ||
type NodeLocalDNSConfig struct { | ||
// Disable indicates we do not wish to run the node-local-dns addon | ||
Enabled bool `json:"enabled,omitempty"` |
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 we actually should make this Enabled *bool
, because we want to differentiate between:
nodeLocalDNSConfig:
enabled: false
localIP: 10.0.0.1
and
nodeLocalDNSConfig:
localIP: 10.0.0.1
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 suppose this could be a change we do if we consider enabling this by default. If not, we don't really need to distinguish between the two now.
Thanks @mazzy89 A few small nits, and the /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, mazzy89 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 |
As discussed in kubernetes#8780 so we differentiate between false and not-set. Also tweak the comment.
Signed-off-by: Salvatore Mazzarino [email protected]
From k8s 1.18 NodeLocal DNSCache is GA.
This PR aims to implement NodeLocal DNSCache as an addon and enable it only when CoreDNS is enabled too.