Skip to content

Commit 2784783

Browse files
committed
add back the removed OCP hack from d/s merge
one OCP hack was removed in the last d/s merge process [0] the current d/s merge is using 'git merge -X theirs' to ensure we get exactly what is upstream and will have to be re-worked to prevent this in the future. the change that was made upstream that caused this was a refactor for gw init and DPU host handling [1] that came in recently. this commit adds the OCP hack back as well as keeping the changes introduced upstream with [1] [0] https://github.com/openshift/ovn-kubernetes/pull/2693/files#diff-d09b4698b05e3cc5ad6d020187ffb80247f0ed6f784d61a93ee4e28742e3f827 [1] ovn-kubernetes/ovn-kubernetes@5b5bc06#diff-d09b4698b05e3cc5ad6d020187ffb80247f0ed6f784d61a93ee4e28742e3f827 Signed-off-by: Jamo Luhrsen <[email protected]>
1 parent 8b7502c commit 2784783

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

go-controller/pkg/ovn/controller/services/lb_config.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ func makeNodeRouterTargetIPs(service *corev1.Service, node *nodeInfo, c *lbConfi
105105
targetIPsV6 = localIPsV6
106106
}
107107

108+
// OCP HACK BEGIN
109+
if _, set := service.Annotations[localWithFallbackAnnotation]; set && c.externalTrafficLocal {
110+
// if service is annotated and is ETP=local, fallback to ETP=cluster on nodes with no local endpoints:
111+
// include endpoints from other nodes
112+
if len(targetIPsV4) == 0 {
113+
zeroRouterLocalEndpointsV4 = true
114+
targetIPsV4 = c.clusterEndpoints.V4IPs
115+
}
116+
if len(targetIPsV6) == 0 {
117+
zeroRouterLocalEndpointsV6 = true
118+
targetIPsV6 = c.clusterEndpoints.V6IPs
119+
}
120+
}
121+
// OCP HACK END
122+
108123
// TODO: For all scenarios the lbAddress should be set to hostAddressesStr but this is breaking CI needs more investigation
109124
lbAddresses := node.hostAddressesStr()
110125
if config.OvnKubeNode.Mode == types.NodeModeFull {

0 commit comments

Comments
 (0)