mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
no warning event on dns search deduplication
This commit is contained in:
parent
8532cdfd69
commit
4fed1971f6
@ -95,10 +95,6 @@ func omitDuplicates(kl *Kubelet, pod *v1.Pod, combinedSearch []string) []string
|
||||
if _, exists := uniqueDomains[dnsDomain]; !exists {
|
||||
combinedSearch[len(uniqueDomains)] = dnsDomain
|
||||
uniqueDomains[dnsDomain] = true
|
||||
} else {
|
||||
log := fmt.Sprintf("Found and omitted duplicated dns domain in host search line: '%s' during merging with cluster dns domains", dnsDomain)
|
||||
kl.recorder.Event(pod, v1.EventTypeWarning, "DNSSearchForming", log)
|
||||
glog.Error(log)
|
||||
}
|
||||
}
|
||||
return combinedSearch[:len(uniqueDomains)]
|
||||
|
@ -138,10 +138,7 @@ func TestComposeDNSSearch(t *testing.T) {
|
||||
[]string{"testNS.svc.TEST", "svc.TEST", "TEST"},
|
||||
[]string{"AAA", "svc.TEST", "BBB", "TEST"},
|
||||
[]string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB"},
|
||||
[]string{
|
||||
"Found and omitted duplicated dns domain in host search line: 'svc.TEST' during merging with cluster dns domains",
|
||||
"Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains",
|
||||
},
|
||||
[]string{},
|
||||
},
|
||||
|
||||
{
|
||||
@ -156,8 +153,6 @@ func TestComposeDNSSearch(t *testing.T) {
|
||||
[]string{"AAA", "TEST", "BBB", "TEST", "CCC", "DDD"},
|
||||
[]string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB", "CCC"},
|
||||
[]string{
|
||||
"Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains",
|
||||
"Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains",
|
||||
"Search Line limits were exceeded, some dns names have been omitted, the applied search line is: testNS.svc.TEST svc.TEST TEST AAA BBB CCC",
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user