Skip to content

Commit

Permalink
fix var name
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Jul 24, 2024
1 parent c78c4a9 commit e643e93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/controller/vpc_dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -519,7 +519,7 @@ func (c *Controller) resyncVpcDNSConfig() {
return
}
}
enableCoreDNS = newEnableCoredns
enableCoreDNS = newEnableCoreDNS
}

func (c *Controller) getDefaultCoreDNSImage() (string, error) {
Expand Down

0 comments on commit e643e93

Please sign in to comment.