Skip to content

Commit a020932

Browse files
[virtual-machine] Exclude external VM services from Cilium BPF LB
Add service.kubernetes.io/service-proxy-name label to LoadBalancer services when external: true. This prevents Cilium from adding the service to its BPF service map, fixing two issues: 1. Inter-tenant connectivity via public LB IPs: Cilium's kube-proxy replacement DNATs traffic to LB IPs before policy evaluation, causing the CiliumClusterwideNetworkPolicy to block legitimate cross-tenant traffic through public IPs. 2. WholeIP broken on Cilium 1.19+ (#2327): wildcard service drop entries block all ports not declared in the Service spec before traffic reaches cozy-proxy's nftables rules. With this label, Cilium completely ignores the Service. Routing is handled by kube-ovn (via the wholeIP annotation) and MetalLB continues to advertise the IP via L2 unaffected. Tested on Cilium 1.18.6 and 1.19.1: inter-tenant via LB IP works, pod IP isolation preserved, external access unaffected. Signed-off-by: mattia-eleuteri <[email protected]> (cherry picked from commit 026b1c7)
1 parent 1b32142 commit a020932

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/apps/vm-instance/templates/service.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
apps.cozystack.io/user-service: "true"
88
{{- include "virtual-machine.labels" . | nindent 4 }}
99
{{- if .Values.external }}
10+
service.kubernetes.io/service-proxy-name: "cozy-proxy"
1011
annotations:
1112
networking.cozystack.io/wholeIP: "true"
1213
{{- end }}

0 commit comments

Comments
 (0)