mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Set the dns policy for pods in node e2e tests
This change stops kubelet from sending MissingClusterDNS events for every pod.
This commit is contained in:
parent
04437f6403
commit
dae055dcd6
@ -125,6 +125,10 @@ func (c *PodClient) mungeSpec(pod *api.Pod) {
|
|||||||
if TestContext.NodeName != "" {
|
if TestContext.NodeName != "" {
|
||||||
Expect(pod.Spec.NodeName).To(Or(BeZero(), Equal(TestContext.NodeName)), "Test misconfigured")
|
Expect(pod.Spec.NodeName).To(Or(BeZero(), Equal(TestContext.NodeName)), "Test misconfigured")
|
||||||
pod.Spec.NodeName = TestContext.NodeName
|
pod.Spec.NodeName = TestContext.NodeName
|
||||||
|
// Node e2e does not support the default DNSClusterFirst policy. Set
|
||||||
|
// the policy to DNSDefault, which is configured per node.
|
||||||
|
pod.Spec.DNSPolicy = api.DNSDefault
|
||||||
|
|
||||||
if !TestContext.PrepullImages {
|
if !TestContext.PrepullImages {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user