Skip to content

Commit

Permalink
Merge pull request #1972 from tssurya/OCPBUGS-24420
Browse files Browse the repository at this point in the history
OCPBUGS-24420: OVNK/GW: Ignore headless services in syncServices
  • Loading branch information
openshift-merge-bot[bot] committed Jan 22, 2024
2 parents 26d51d0 + 34790ca commit 3c8a6c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go-controller/pkg/node/gateway_shared_intf.go
Expand Up @@ -694,6 +694,10 @@ func (npw *nodePortWatcher) SyncServices(services []interface{}) error {
serviceInterface)
continue
}
// don't process headless service
if !util.ServiceTypeHasClusterIP(service) || !util.IsClusterIPSet(service) {
continue
}

epSlices, err := npw.watchFactory.GetEndpointSlices(service.Namespace, service.Name)
if err != nil {
Expand Down Expand Up @@ -1026,6 +1030,10 @@ func (npwipt *nodePortWatcherIptables) SyncServices(services []interface{}) erro
serviceInterface)
continue
}
// don't process headless service
if !util.ServiceTypeHasClusterIP(service) || !util.IsClusterIPSet(service) {
continue
}
// Add correct iptables rules.
// TODO: ETP and ITP is not implemented for smart NIC mode.
keepIPTRules = append(keepIPTRules, getGatewayIPTRules(service, nil, false)...)
Expand Down

0 comments on commit 3c8a6c4

Please sign in to comment.