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

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
This commit is contained in:
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

View File

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