diff --git a/pkg/controller/ovn_dnat.go b/pkg/controller/ovn_dnat.go index 6e7e3e81f494..3fdee54adae4 100644 --- a/pkg/controller/ovn_dnat.go +++ b/pkg/controller/ovn_dnat.go @@ -14,6 +14,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" "github.com/kubeovn/kube-ovn/pkg/util" @@ -63,8 +64,7 @@ func (c *Controller) enqueueDelOvnDnatRule(obj interface{}) { return } klog.Infof("enqueue delete ovn dnat %s", key) - dnat := obj.(*kubeovnv1.OvnDnatRule) - c.delOvnDnatRuleQueue.Add(dnat) + c.delOvnDnatRuleQueue.Add(key) } func (c *Controller) runAddOvnDnatRuleWorker() { @@ -150,16 +150,16 @@ func (c *Controller) processNextDeleteOvnDnatRuleWorkItem() bool { err := func(obj interface{}) error { defer c.delOvnDnatRuleQueue.Done(obj) - var dnat *kubeovnv1.OvnDnatRule + var key string var ok bool - if dnat, ok = obj.(*kubeovnv1.OvnDnatRule); !ok { + if key, ok = obj.(string); !ok { c.delOvnDnatRuleQueue.Forget(obj) utilruntime.HandleError(fmt.Errorf("expected string in workqueue but got %#v", obj)) return nil } - if err := c.handleDelOvnDnatRule(dnat); err != nil { - c.delOvnDnatRuleQueue.AddRateLimited(obj) - return fmt.Errorf("error syncing '%s': %s, requeuing", dnat.Name, err.Error()) + if err := c.handleDelOvnDnatRule(key); err != nil { + c.delOvnDnatRuleQueue.AddRateLimited(key) + return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error()) } c.delOvnDnatRuleQueue.Forget(obj) return nil @@ -274,7 +274,7 @@ func (c *Controller) handleAddOvnDnatRule(key string) error { return err } - if err = c.handleAddOvnEipFinalizer(cachedEip, util.OvnEipFinalizer); err != nil { + if err = c.handleAddOvnEipFinalizer(cachedEip, util.ControllerName); err != nil { klog.Errorf("failed to add finalizer for ovn eip, %v", err) return err } @@ -285,6 +285,11 @@ func (c *Controller) handleAddOvnDnatRule(key string) error { return err } + if err := c.handleAddOvnDnatFinalizer(cachedDnat, util.ControllerName); err != nil { + klog.Errorf("failed to add finalizer for ovn dnat %s, %v", cachedDnat.Name, err) + return err + } + // patch dnat eip relationship if err = c.natLabelAndAnnoOvnEip(eipName, cachedDnat.Name, vpcName); err != nil { klog.Errorf("failed to label dnat '%s' in eip %s, %v", cachedDnat.Name, eipName, err) @@ -310,16 +315,29 @@ func (c *Controller) handleAddOvnDnatRule(key string) error { return nil } -func (c *Controller) handleDelOvnDnatRule(dnat *kubeovnv1.OvnDnatRule) error { - if dnat.Status.Vpc != "" && dnat.Status.V4Eip != "" && dnat.Status.ExternalPort != "" { - if err := c.DelDnatRule(dnat.Status.Vpc, dnat.Name, - dnat.Status.V4Eip, dnat.Status.ExternalPort); err != nil { - klog.Errorf("failed to delete dnat, %v", err) +func (c *Controller) handleDelOvnDnatRule(key string) error { + cachedDnat, err := c.ovnDnatRulesLister.Get(key) + if err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Error(err) + return err + } + klog.Infof("handle delete ovn dnat %s", key) + if cachedDnat.Status.Vpc != "" && cachedDnat.Status.V4Eip != "" && cachedDnat.Status.ExternalPort != "" { + if err = c.DelDnatRule(cachedDnat.Status.Vpc, cachedDnat.Name, + cachedDnat.Status.V4Eip, cachedDnat.Status.ExternalPort); err != nil { + klog.Errorf("failed to delete dnat %s, %v", key, err) return err } } - if dnat.Spec.OvnEip != "" { - c.resetOvnEipQueue.Add(dnat.Spec.OvnEip) + if err = c.handleDelOvnDnatFinalizer(cachedDnat, util.ControllerName); err != nil { + klog.Errorf("failed to remove finalizer for ovn dnat %s, %v", cachedDnat.Name, err) + return err + } + if cachedDnat.Spec.OvnEip != "" { + c.resetOvnEipQueue.Add(cachedDnat.Spec.OvnEip) } return nil } @@ -592,3 +610,50 @@ func (c *Controller) DelDnatRule(vpcName, dnatName, externalIp, externalPort str return nil } + +func (c *Controller) handleAddOvnDnatFinalizer(cachedDnat *kubeovnv1.OvnDnatRule, finalizer string) error { + if cachedDnat.DeletionTimestamp.IsZero() { + if util.ContainsString(cachedDnat.Finalizers, finalizer) { + return nil + } + } + newDnat := cachedDnat.DeepCopy() + controllerutil.AddFinalizer(newDnat, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedDnat, newDnat) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn dnat '%s', %v", cachedDnat.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnDnatRules().Patch(context.Background(), cachedDnat.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to add finalizer for ovn dnat '%s', %v", cachedDnat.Name, err) + return err + } + return nil +} + +func (c *Controller) handleDelOvnDnatFinalizer(cachedDnat *kubeovnv1.OvnDnatRule, finalizer string) error { + if len(cachedDnat.Finalizers) == 0 { + return nil + } + var err error + newDnat := cachedDnat.DeepCopy() + controllerutil.RemoveFinalizer(newDnat, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedDnat, newDnat) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn dnat '%s', %v", cachedDnat.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnDnatRules().Patch(context.Background(), cachedDnat.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to remove finalizer from ovn dnat '%s', %v", cachedDnat.Name, err) + return err + } + return nil +} diff --git a/pkg/controller/ovn_eip.go b/pkg/controller/ovn_eip.go index d1ce97555a13..f0f9ed8ea424 100644 --- a/pkg/controller/ovn_eip.go +++ b/pkg/controller/ovn_eip.go @@ -74,8 +74,7 @@ func (c *Controller) enqueueDelOvnEip(obj interface{}) { return } klog.Infof("enqueue del ovn eip %s", key) - eip := obj.(*kubeovnv1.OvnEip) - c.delOvnEipQueue.Add(eip) + c.delOvnEipQueue.Add(key) } func (c *Controller) runAddOvnEipWorker() { @@ -189,16 +188,16 @@ func (c *Controller) processNextDeleteOvnEipWorkItem() bool { } err := func(obj interface{}) error { defer c.delOvnEipQueue.Done(obj) - var eip *kubeovnv1.OvnEip + var key string var ok bool - if eip, ok = obj.(*kubeovnv1.OvnEip); !ok { + if key, ok = obj.(string); !ok { c.delOvnEipQueue.Forget(obj) utilruntime.HandleError(fmt.Errorf("expected ovn eip in workqueue but got %#v", obj)) return nil } - if err := c.handleDelOvnEip(eip); err != nil { - c.delOvnEipQueue.AddRateLimited(obj) - return fmt.Errorf("error syncing '%s': %s, requeuing", eip.Name, err.Error()) + if err := c.handleDelOvnEip(key); err != nil { + c.delOvnEipQueue.AddRateLimited(key) + return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error()) } c.delOvnEipQueue.Forget(obj) return nil @@ -285,7 +284,7 @@ func (c *Controller) handleUpdateOvnEip(key string) error { klog.Error(err) return err } - klog.V(3).Infof("handle update ovn eip %s", cachedEip.Name) + klog.Infof("handle update ovn eip %s", cachedEip.Name) if !cachedEip.DeletionTimestamp.IsZero() { subnetName := cachedEip.Spec.ExternalSubnet if subnetName == "" { @@ -332,28 +331,37 @@ func (c *Controller) handleResetOvnEip(key string) error { return nil } -func (c *Controller) handleDelOvnEip(eip *kubeovnv1.OvnEip) error { - klog.V(3).Infof("handle del ovn eip %s", eip.Name) +func (c *Controller) handleDelOvnEip(key string) error { + klog.Infof("handle del ovn eip %s", key) + eip, err := c.ovnEipsLister.Get(key) + if err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Error(err) + return err + } + if len(eip.Finalizers) > 1 { - err := errors.New("eip is referenced, it cannot be deleted directly") + err = errors.New("eip is referenced, it cannot be deleted directly") klog.Errorf("failed to delete eip %s, %v", eip.Name, err) return err } - if err := c.handleDelOvnEipFinalizer(eip, util.OvnEipFinalizer); err != nil { + if err = c.handleDelOvnEipFinalizer(eip, util.ControllerName); err != nil { klog.Errorf("failed to handle remove ovn eip finalizer , %v", err) return err } if eip.Spec.Type == util.Lsp { - if err := c.ovnClient.DeleteLogicalSwitchPort(eip.Name); err != nil { + if err = c.ovnClient.DeleteLogicalSwitchPort(eip.Name); err != nil { klog.Errorf("failed to delete lsp %s, %v", eip.Name, err) return err } } if eip.Spec.Type == util.Lrp { - if err := c.ovnClient.DeleteLogicalRouterPort(eip.Name); err != nil { + if err = c.ovnClient.DeleteLogicalRouterPort(eip.Name); err != nil { klog.Errorf("failed to delete lrp %s, %v", eip.Name, err) return err } diff --git a/pkg/controller/ovn_fip.go b/pkg/controller/ovn_fip.go index 50e097f578d9..fa3ed4292760 100644 --- a/pkg/controller/ovn_fip.go +++ b/pkg/controller/ovn_fip.go @@ -14,6 +14,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" "github.com/kubeovn/kube-ovn/pkg/ovsdb/ovnnb" @@ -62,8 +63,7 @@ func (c *Controller) enqueueDelOvnFip(obj interface{}) { return } klog.Infof("enqueue del ovn fip %s", key) - fip := obj.(*kubeovnv1.OvnFip) - c.delOvnFipQueue.Add(fip) + c.delOvnFipQueue.Add(key) } func (c *Controller) runAddOvnFipWorker() { @@ -146,16 +146,16 @@ func (c *Controller) processNextDeleteOvnFipWorkItem() bool { } err := func(obj interface{}) error { defer c.delOvnFipQueue.Done(obj) - var fip *kubeovnv1.OvnFip + var key string var ok bool - if fip, ok = obj.(*kubeovnv1.OvnFip); !ok { + if key, ok = obj.(string); !ok { c.delOvnFipQueue.Forget(obj) utilruntime.HandleError(fmt.Errorf("expected fip in workqueue but got %#v", obj)) return nil } - if err := c.handleDelOvnFip(fip); err != nil { - c.delOvnFipQueue.AddRateLimited(obj) - return fmt.Errorf("error syncing '%s': %s, requeuing", fip.Name, err.Error()) + if err := c.handleDelOvnFip(key); err != nil { + c.delOvnFipQueue.AddRateLimited(key) + return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error()) } c.delOvnFipQueue.Forget(obj) return nil @@ -272,7 +272,7 @@ func (c *Controller) handleAddOvnFip(key string) error { klog.Errorf("failed to patch status for fip %s, %v", key, err) return err } - if err = c.handleAddOvnEipFinalizer(cachedEip, util.OvnEipFinalizer); err != nil { + if err = c.handleAddOvnEipFinalizer(cachedEip, util.ControllerName); err != nil { klog.Errorf("failed to add finalizer for ovn eip, %v", err) return err } @@ -283,6 +283,12 @@ func (c *Controller) handleAddOvnFip(key string) error { klog.Errorf("failed to create v4 fip, %v", err) return err } + + if err = c.handleAddOvnFipFinalizer(cachedFip, util.ControllerName); err != nil { + klog.Errorf("failed to add finalizer for ovn fip, %v", err) + return err + } + // patch fip eip relationship if err = c.natLabelAndAnnoOvnEip(eipName, cachedFip.Name, vpcName); err != nil { klog.Errorf("failed to label fip '%s' in eip %s, %v", cachedFip.Name, eipName, err) @@ -406,18 +412,30 @@ func (c *Controller) handleUpdateOvnFip(key string) error { return nil } -func (c *Controller) handleDelOvnFip(fip *kubeovnv1.OvnFip) error { - klog.Infof("handle del ovn fip %s", fip.Name) - // ovn delete fip - if fip.Status.Vpc != "" && fip.Status.V4Eip != "" && fip.Status.V4Ip != "" { - if err := c.ovnClient.DeleteNat(fip.Status.Vpc, ovnnb.NATTypeDNATAndSNAT, fip.Status.V4Eip, fip.Status.V4Ip); err != nil { - klog.Errorf("failed to delete fip, %v", err) +func (c *Controller) handleDelOvnFip(key string) error { + klog.Infof("handle del ovn fip %s", key) + cachedFip, err := c.ovnFipsLister.Get(key) + if err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Error(err) + return err + } + // ovn delete fip nat + if cachedFip.Status.Vpc != "" && cachedFip.Status.V4Eip != "" && cachedFip.Status.V4Ip != "" { + if err = c.ovnClient.DeleteNat(cachedFip.Status.Vpc, ovnnb.NATTypeDNATAndSNAT, cachedFip.Status.V4Eip, cachedFip.Status.V4Ip); err != nil { + klog.Errorf("failed to delete fip %s, %v", key, err) return err } } + if err = c.handleDelOvnFipFinalizer(cachedFip, util.ControllerName); err != nil { + klog.Errorf("failed to remove finalizer for ovn fip %s, %v", cachedFip.Name, err) + return err + } // reset eip - if fip.Spec.OvnEip != "" { - c.resetOvnEipQueue.Add(fip.Spec.OvnEip) + if cachedFip.Spec.OvnEip != "" { + c.resetOvnEipQueue.Add(cachedFip.Spec.OvnEip) } return nil } @@ -544,3 +562,50 @@ func (c *Controller) GetOvnEip(eipName string) (*kubeovnv1.OvnEip, error) { } return cachedEip, nil } + +func (c *Controller) handleAddOvnFipFinalizer(cachedFip *kubeovnv1.OvnFip, finalizer string) error { + if cachedFip.DeletionTimestamp.IsZero() { + if util.ContainsString(cachedFip.Finalizers, finalizer) { + return nil + } + } + newFip := cachedFip.DeepCopy() + controllerutil.AddFinalizer(newFip, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedFip, newFip) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn fip '%s', %v", cachedFip.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnFips().Patch(context.Background(), cachedFip.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to add finalizer for ovn fip '%s', %v", cachedFip.Name, err) + return err + } + return nil +} + +func (c *Controller) handleDelOvnFipFinalizer(cachedFip *kubeovnv1.OvnFip, finalizer string) error { + if len(cachedFip.Finalizers) == 0 { + return nil + } + var err error + newFip := cachedFip.DeepCopy() + controllerutil.RemoveFinalizer(newFip, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedFip, newFip) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn fip '%s', %v", cachedFip.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnFips().Patch(context.Background(), cachedFip.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to remove finalizer from ovn fip '%s', %v", cachedFip.Name, err) + return err + } + return nil +} diff --git a/pkg/controller/ovn_snat.go b/pkg/controller/ovn_snat.go index 59bbedcd407c..4d2a08c889aa 100644 --- a/pkg/controller/ovn_snat.go +++ b/pkg/controller/ovn_snat.go @@ -11,6 +11,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" "github.com/kubeovn/kube-ovn/pkg/ovsdb/ovnnb" @@ -58,8 +59,7 @@ func (c *Controller) enqueueDelOvnSnatRule(obj interface{}) { return } klog.Infof("enqueue del ovn snat %s", key) - snat := obj.(*kubeovnv1.OvnSnatRule) - c.delOvnSnatRuleQueue.Add(snat) + c.delOvnSnatRuleQueue.Add(key) } func (c *Controller) runAddOvnSnatRuleWorker() { @@ -145,16 +145,16 @@ func (c *Controller) processNextDeleteOvnSnatRuleWorkItem() bool { err := func(obj interface{}) error { defer c.delOvnSnatRuleQueue.Done(obj) - var snat *kubeovnv1.OvnSnatRule + var key string var ok bool - if snat, ok = obj.(*kubeovnv1.OvnSnatRule); !ok { + if key, ok = obj.(string); !ok { c.delOvnSnatRuleQueue.Forget(obj) utilruntime.HandleError(fmt.Errorf("expected snat in workqueue but got %#v", obj)) return nil } - if err := c.handleDelOvnSnatRule(snat); err != nil { - c.delOvnSnatRuleQueue.AddRateLimited(obj) - return fmt.Errorf("error syncing '%s': %s, requeuing", snat.Name, err.Error()) + if err := c.handleDelOvnSnatRule(key); err != nil { + c.delOvnSnatRuleQueue.AddRateLimited(key) + return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error()) } c.delOvnSnatRuleQueue.Forget(obj) return nil @@ -237,7 +237,7 @@ func (c *Controller) handleAddOvnSnatRule(key string) error { } // create snat - if err = c.handleAddOvnEipFinalizer(cachedEip, util.OvnEipFinalizer); err != nil { + if err = c.handleAddOvnEipFinalizer(cachedEip, util.ControllerName); err != nil { klog.Errorf("failed to add finalizer for ovn eip, %v", err) return err } @@ -246,6 +246,10 @@ func (c *Controller) handleAddOvnSnatRule(key string) error { klog.Errorf("failed to create snat, %v", err) return err } + if err := c.handleAddOvnSnatFinalizer(cachedSnat, util.ControllerName); err != nil { + klog.Errorf("failed to add finalizer for ovn snat %s, %v", cachedSnat.Name, err) + return err + } if err = c.natLabelAndAnnoOvnEip(eipName, cachedSnat.Name, vpcName); err != nil { klog.Errorf("failed to label snat '%s' in eip %s, %v", cachedSnat.Name, eipName, err) return err @@ -353,18 +357,31 @@ func (c *Controller) handleUpdateOvnSnatRule(key string) error { return nil } -func (c *Controller) handleDelOvnSnatRule(snat *kubeovnv1.OvnSnatRule) error { - klog.Infof("deleted ovn snat %s", snat.Name) +func (c *Controller) handleDelOvnSnatRule(key string) error { + cachedSnat, err := c.ovnSnatRulesLister.Get(key) + if err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Error(err) + return err + } + klog.Infof("handle delete ovn snat %s", key) // ovn delete snat - if snat.Status.Vpc != "" && snat.Status.V4Eip != "" && snat.Status.V4IpCidr != "" { - if err := c.ovnClient.DeleteNat(snat.Status.Vpc, ovnnb.NATTypeSNAT, snat.Status.V4Eip, snat.Status.V4IpCidr); err != nil { - klog.Errorf("failed to delete snat, %v", err) + if cachedSnat.Status.Vpc != "" && cachedSnat.Status.V4Eip != "" && cachedSnat.Status.V4IpCidr != "" { + if err = c.ovnClient.DeleteNat(cachedSnat.Status.Vpc, ovnnb.NATTypeSNAT, + cachedSnat.Status.V4Eip, cachedSnat.Status.V4IpCidr); err != nil { + klog.Errorf("failed to delete snat %s, %v", key, err) return err } } + if err = c.handleDelOvnSnatFinalizer(cachedSnat, util.ControllerName); err != nil { + klog.Errorf("failed to remove finalizer for ovn snat %s, %v", cachedSnat.Name, err) + return err + } // reset eip - if snat.Spec.OvnEip != "" { - c.resetOvnEipQueue.Add(snat.Spec.OvnEip) + if cachedSnat.Spec.OvnEip != "" { + c.resetOvnEipQueue.Add(cachedSnat.Spec.OvnEip) } return nil } @@ -477,3 +494,50 @@ func (c *Controller) ovnSnatChangeEip(snat *kubeovnv1.OvnSnatRule, eip *kubeovnv } return false } + +func (c *Controller) handleAddOvnSnatFinalizer(cachedSnat *kubeovnv1.OvnSnatRule, finalizer string) error { + if cachedSnat.DeletionTimestamp.IsZero() { + if util.ContainsString(cachedSnat.Finalizers, finalizer) { + return nil + } + } + newSnat := cachedSnat.DeepCopy() + controllerutil.AddFinalizer(newSnat, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedSnat, newSnat) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn snat '%s', %v", cachedSnat.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnSnatRules().Patch(context.Background(), cachedSnat.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to add finalizer for ovn snat '%s', %v", cachedSnat.Name, err) + return err + } + return nil +} + +func (c *Controller) handleDelOvnSnatFinalizer(cachedSnat *kubeovnv1.OvnSnatRule, finalizer string) error { + if len(cachedSnat.Finalizers) == 0 { + return nil + } + var err error + newSnat := cachedSnat.DeepCopy() + controllerutil.RemoveFinalizer(newSnat, finalizer) + patch, err := util.GenerateMergePatchPayload(cachedSnat, newSnat) + if err != nil { + klog.Errorf("failed to generate patch payload for ovn snat '%s', %v", cachedSnat.Name, err) + return err + } + if _, err := c.config.KubeOvnClient.KubeovnV1().OvnSnatRules().Patch(context.Background(), cachedSnat.Name, + types.MergePatchType, patch, metav1.PatchOptions{}, ""); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + klog.Errorf("failed to remove finalizer from ovn snat '%s', %v", cachedSnat.Name, err) + return err + } + return nil +} diff --git a/pkg/util/const.go b/pkg/util/const.go index 83ad8a71a280..1885ef1c94b7 100644 --- a/pkg/util/const.go +++ b/pkg/util/const.go @@ -20,7 +20,6 @@ const ( FipNameAnnotation = "ovn.kubernetes.io/fip_name" FipEnableAnnotation = "ovn.kubernetes.io/enable_fip" FipFinalizer = "ovn.kubernetes.io/fip" - OvnEipFinalizer = "ovn.kubernetes.io/ovn_eip" VipAnnotation = "ovn.kubernetes.io/vip" ChassisAnnotation = "ovn.kubernetes.io/chassis"