pkg/kubelet/network/dns: omit unnecessary fmt.Sprintf

This commit is contained in:
ZhangYu 2022-11-29 14:44:14 +08:00
parent 7061704297
commit 6553ba246f

View File

@ -319,7 +319,7 @@ func getPodDNSType(pod *v1.Pod) (podDNSType, error) {
}
// This should not happen as kube-apiserver should have rejected
// invalid dnsPolicy.
return podDNSCluster, fmt.Errorf(fmt.Sprintf("invalid DNSPolicy=%v", dnsPolicy))
return podDNSCluster, fmt.Errorf("invalid DNSPolicy=%v", dnsPolicy)
}
// mergeDNSOptions merges DNS options. If duplicated, entries given by PodDNSConfigOption will