Skip to content

Commit

Permalink
Skip processing Service without IPPool annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Xu Liu <[email protected]>
  • Loading branch information
xliuxu committed Jan 23, 2025
1 parent f8d2ead commit 6ef2d70
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controller/serviceexternalip/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ func (c *ServiceExternalIPController) enqueueService(obj interface{}) {
Namespace: service.Namespace,
Name: service.Name,
}

_, allocationExists := c.getExternalIPAllocation(namespacedName)
if !allocationExists && getServiceExternalIPPool(service) == "" {
return
}

c.queue.Add(namespacedName)
}

Expand Down Expand Up @@ -499,7 +505,7 @@ func (c *ServiceExternalIPController) syncService(key apimachinerytypes.Namespac
}

if currentIPPool == "" {
klog.V(2).InfoS("Ignored Service as required annotation is not found", "service", key)
klog.V(2).InfoS("Ignored Service as the required annotation no longer exists", "service", key)
if released {
return c.updateServiceLoadBalancerIP(service, nil)
}
Expand Down

0 comments on commit 6ef2d70

Please sign in to comment.