Use `ipFamilyPolicy: RequireDualStack` for dual-stack kube-dns (#8984)

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
pull/9025/head
Aofei Sheng 2024-01-09 06:44:03 +08:00 committed by GitHub
parent ac8fe8de2b
commit 8d2c40cdac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -274,9 +274,9 @@ func stageFiles(ctx context.Context, sc *Context, controlConfig *config.Control)
} }
dataDir = filepath.Join(controlConfig.DataDir, "manifests") dataDir = filepath.Join(controlConfig.DataDir, "manifests")
dnsIPFamilyPolicy := "PreferDualStack" dnsIPFamilyPolicy := "SingleStack"
if len(controlConfig.ClusterDNSs) == 1 { if len(controlConfig.ClusterDNSs) > 1 {
dnsIPFamilyPolicy = "SingleStack" dnsIPFamilyPolicy = "RequireDualStack"
} }
templateVars := map[string]string{ templateVars := map[string]string{