lb: restrict ClusterIP svc lb wildcard candidates to ExternalClusterIP
Scenario: The service loadbalancer programs wildcards in the BPF service map if a candidate parent frontend exists. Frontends that are candidate for parenting wildcards are ClusterIP and LoadBalancer that are ScopeExternal. The intent is to avoid Cilium ingesting and forwarding packets towards a ClusterIP/LoadBalancer VIP that has no actual service associated with the packet L4 port/protocol, as this can cause forwarding loops.
Issue: A cluster with a lot of ClusterIP entries can cause excessive BPF map pressure.
Proposal:
ClusterIPs are by default not accessible outside the cluster. We could constrain wildcards such that ClusterIPs can only parent a wildcard if externally accessible via bpf-lb-external-clusterip=true. This would reduce pressure on the BPF service map in default configurations.
Source: cilium/cilium