Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/controller/vpc_nat_gw_nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

Expand All @@ -22,7 +21,7 @@

func (c *Controller) enqueueAddIptablesFip(obj any) {
key := cache.MetaObjectToName(obj.(*kubeovnv1.IptablesFIPRule)).String()
klog.V(3).Infof("enqueue add iptables fip %s", key)

Check failure on line 24 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 24 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.addIptablesFipQueue.Add(key)
}

Expand All @@ -31,7 +30,7 @@
newFip := newObj.(*kubeovnv1.IptablesFIPRule)
key := cache.MetaObjectToName(newFip).String()
if !newFip.DeletionTimestamp.IsZero() {
klog.V(3).Infof("enqueue update to clean fip %s", key)

Check failure on line 33 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 33 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.updateIptablesFipQueue.Add(key)
return
}
Expand All @@ -43,7 +42,7 @@
oldFip.Spec.EIP != newFip.Spec.EIP ||
oldFip.Status.Redo != newFip.Status.Redo ||
oldFip.Spec.InternalIP != newFip.Spec.InternalIP {
klog.V(3).Infof("enqueue update fip %s", key)

Check failure on line 45 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 45 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.updateIptablesFipQueue.Add(key)
return
}
Expand All @@ -51,13 +50,13 @@

func (c *Controller) enqueueDelIptablesFip(obj any) {
key := cache.MetaObjectToName(obj.(*kubeovnv1.IptablesFIPRule)).String()
klog.V(3).Infof("enqueue delete iptables fip %s", key)

Check failure on line 53 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 53 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.delIptablesFipQueue.Add(key)
}

func (c *Controller) enqueueAddIptablesDnatRule(obj any) {
key := cache.MetaObjectToName(obj.(*kubeovnv1.IptablesDnatRule)).String()
klog.V(3).Infof("enqueue add iptables dnat %s", key)

Check failure on line 59 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 59 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.addIptablesDnatRuleQueue.Add(key)
}

Expand All @@ -66,7 +65,7 @@
newDnat := newObj.(*kubeovnv1.IptablesDnatRule)
key := cache.MetaObjectToName(newDnat).String()
if !newDnat.DeletionTimestamp.IsZero() {
klog.V(3).Infof("enqueue update to clean dnat %s", key)

Check failure on line 68 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 68 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.updateIptablesDnatRuleQueue.Add(key)
return
}
Expand All @@ -83,7 +82,7 @@
oldDnat.Spec.InternalIP != newDnat.Spec.InternalIP ||
oldDnat.Spec.InternalPort != newDnat.Spec.InternalPort ||
oldDnat.Spec.ExternalPort != newDnat.Spec.ExternalPort {
klog.V(3).Infof("enqueue update dnat %s", key)

Check failure on line 85 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 85 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.updateIptablesDnatRuleQueue.Add(key)
return
}
Expand All @@ -91,13 +90,13 @@

func (c *Controller) enqueueDelIptablesDnatRule(obj any) {
key := cache.MetaObjectToName(obj.(*kubeovnv1.IptablesDnatRule)).String()
klog.V(3).Infof("enqueue delete iptables dnat %s", key)

Check failure on line 93 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 93 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.delIptablesDnatRuleQueue.Add(key)
}

func (c *Controller) enqueueAddIptablesSnatRule(obj any) {
key := cache.MetaObjectToName(obj.(*kubeovnv1.IptablesSnatRule)).String()
klog.V(3).Infof("enqueue add iptables snat %s", key)

Check failure on line 99 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 99 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.addIptablesSnatRuleQueue.Add(key)
}

Expand All @@ -106,7 +105,7 @@
newSnat := newObj.(*kubeovnv1.IptablesSnatRule)
key := cache.MetaObjectToName(newSnat).String()
if !newSnat.DeletionTimestamp.IsZero() {
klog.V(3).Infof("enqueue update to clean snat %s", key)

Check failure on line 108 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build arm64

undefined: klog

Check failure on line 108 in pkg/controller/vpc_nat_gw_nat.go

View workflow job for this annotation

GitHub Actions / Build kube-ovn

undefined: klog
c.updateIptablesSnatRuleQueue.Add(key)
return
}
Expand Down Expand Up @@ -930,8 +929,7 @@
return nil
}
newIptablesSnat := cachedIptablesSnat.DeepCopy()
controllerutil.RemoveFinalizer(newIptablesSnat, util.DepreciatedFinalizerName)
controllerutil.RemoveFinalizer(newIptablesSnat, util.KubeOVNControllerFinalizer)
controllerutil.AddFinalizer(newIptablesSnat, util.KubeOVNControllerFinalizer)
patch, err := util.GenerateMergePatchPayload(cachedIptablesSnat, newIptablesSnat)
if err != nil {
klog.Errorf("failed to generate patch payload for iptables snat '%s', %v", cachedIptablesSnat.Name, err)
Expand Down
Loading