Skip to content

Commit

Permalink
the provider is not necessary
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
bobz965 committed Oct 8, 2023
1 parent 2953fc3 commit 7ecabf2
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pkg/controller/vpc_dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ func (c *Controller) handleAddOrUpdateVPCDNS(key string) error {
return err
}

if err := c.checkOvnDefaultSpecProvider(); err != nil {
err := fmt.Errorf("failed to check %s spec provider, %v", util.DefaultSubnet, err)
klog.Error(err)
return err
}

if err := c.checkVpcDNSDuplicated(vpcDNS); err != nil {
err = fmt.Errorf("failed to deploy %s, %v", vpcDNS.Name, err)
klog.Error(err)
Expand Down Expand Up @@ -495,20 +489,6 @@ func (c *Controller) checkOvnNad() error {
return nil
}

func (c *Controller) checkOvnDefaultSpecProvider() error {
cachedSubnet, err := c.subnetsLister.Get(util.DefaultSubnet)
if err != nil {
klog.Error(err)
return fmt.Errorf("failed to get default subnet %v", err)
}

if cachedSubnet.Spec.Provider != nadProvider {
return fmt.Errorf("the %s provider does not exist", nadProvider)
}

return nil
}

func (c *Controller) resyncVpcDNSConfig() {
cm, err := c.configMapsLister.ConfigMaps(c.config.PodNamespace).Get(util.VpcDNSConfig)
if err != nil && !k8serrors.IsNotFound(err) {
Expand Down

0 comments on commit 7ecabf2

Please sign in to comment.