From dae055dcd675d102d234ef8e1ce20191b0657e9c Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 12 Oct 2016 13:21:56 -0700 Subject: [PATCH] Set the dns policy for pods in node e2e tests This change stops kubelet from sending MissingClusterDNS events for every pod. --- test/e2e/framework/pods.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/framework/pods.go b/test/e2e/framework/pods.go index f7c7c618585..1bb3f8ec7b8 100644 --- a/test/e2e/framework/pods.go +++ b/test/e2e/framework/pods.go @@ -125,6 +125,10 @@ func (c *PodClient) mungeSpec(pod *api.Pod) { if TestContext.NodeName != "" { Expect(pod.Spec.NodeName).To(Or(BeZero(), Equal(TestContext.NodeName)), "Test misconfigured") 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 { return }