From e643e9394a58119634eb9009abe4a0b842a9d9a2 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Wed, 24 Jul 2024 12:08:58 +0000 Subject: [PATCH] fix var name Signed-off-by: zhangzujian --- pkg/controller/vpc_dns.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/vpc_dns.go b/pkg/controller/vpc_dns.go index 16f2abe92f62..fef363e7a907 100644 --- a/pkg/controller/vpc_dns.go +++ b/pkg/controller/vpc_dns.go @@ -498,17 +498,17 @@ func (c *Controller) resyncVpcDNSConfig() { k8sServiceHost = getValue("k8s-service-host") k8sServicePort = getValue("k8s-service-port") - newEnableCoredns := true + newEnableCoreDNS := true if v, ok := cm.Data["enable-vpc-dns"]; ok { raw, err := strconv.ParseBool(v) if err != nil { klog.Errorf("failed to parse cm enable, %v", err) return } - newEnableCoredns = raw + newEnableCoreDNS = raw } - if enableCoreDNS && !newEnableCoredns { + if enableCoreDNS && !newEnableCoreDNS { if err := c.cleanVpcDNS(); err != nil { klog.Errorf("failed to clear all vpc-dns, %v", err) return @@ -519,7 +519,7 @@ func (c *Controller) resyncVpcDNSConfig() { return } } - enableCoreDNS = newEnableCoredns + enableCoreDNS = newEnableCoreDNS } func (c *Controller) getDefaultCoreDNSImage() (string, error) {