Skip to content
Closed
Changes from all 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
3 changes: 1 addition & 2 deletions pkg/controller/vpc_nat_gw_nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,7 @@ func (c *Controller) handleDelIptablesSnatFinalizer(key string) error {
return nil
}
newIptablesSnat := cachedIptablesSnat.DeepCopy()
controllerutil.RemoveFinalizer(newIptablesSnat, util.DepreciatedFinalizerName)
controllerutil.RemoveFinalizer(newIptablesSnat, util.KubeOVNControllerFinalizer)
controllerutil.AddFinalizer(newIptablesSnat, util.KubeOVNControllerFinalizer)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉有点不对劲:上面的 handleAddIptablesSnatFinalizer 是删除 finalizer,这里的 handleDelIptablesSnatFinalizer 是添加 finalizer。

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