Skip to content

Commit

Permalink
Merge branch 'main' into bidirection
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanBakliwal committed Feb 8, 2025
2 parents a6b9359 + a265cc3 commit 2c10742
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/images/deps/cni-binaries-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.1
v1.6.2
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ require (
golang.org/x/tools v0.29.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210506160403-92e472f520a5
google.golang.org/grpc v1.70.0
google.golang.org/protobuf v1.36.4
google.golang.org/protobuf v1.36.5
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM=
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
26 changes: 20 additions & 6 deletions pkg/controller/serviceexternalip/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,26 @@ func NewServiceExternalIPController(
})

c.serviceInformer.AddEventHandlerWithResyncPeriod(
cache.ResourceEventHandlerFuncs{
AddFunc: c.enqueueService,
UpdateFunc: func(old, cur interface{}) {
c.enqueueService(cur)
cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
svc, ok := obj.(*corev1.Service)
if ok {
return getServiceExternalIPPool(svc) != ""
}
if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok {
if cast, ok := tombstone.Obj.(*corev1.Service); ok {
return getServiceExternalIPPool(cast) != ""
}
}
return false
},
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: c.enqueueService,
UpdateFunc: func(_, obj interface{}) {
c.enqueueService(obj)
},
DeleteFunc: c.enqueueService,
},
DeleteFunc: c.enqueueService,
},
resyncPeriod,
)
Expand Down Expand Up @@ -499,7 +513,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 2c10742

Please sign in to comment.