mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +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 != "" {
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user