Files
home-cluster/bootstrap/templates/kubernetes/apps/kube-system/cilium/config/cilium-l3.yaml.j2
T
Devin Buhl b275b781fd feat(talos): change from net.ifnames to a macaddr deviceSelector (#1376)
* feat(talos): change from net.ifnames to a macaddr deviceSelector

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: derpge

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: logic is easier to follow now questionmark

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: logic is easier to follow now questionmark

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-03-18 19:06:19 -04:00

41 lines
1.1 KiB
YAML

#% if bootstrap_bgp.enabled %#
---
# https://docs.cilium.io/en/latest/network/bgp-control-plane/
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPPeeringPolicy
metadata:
name: l3-policy
spec:
nodeSelector:
matchLabels:
kubernetes.io/os: linux
virtualRouters:
- localASN: #{ bootstrap_bgp.local_asn }#
neighbors:
#% if bootstrap_bgp.peers %#
#% for item in bootstrap_bgp.peers %#
- peerAddress: "#{ item }#/32"
peerASN: #{ bootstrap_bgp.peer_asn }#
#% endfor %#
#% else %#
#% if bootstrap_node_default_gateway %#
- peerAddress: "#{ bootstrap_node_default_gateway }#/32"
#% else %#
- peerAddress: "#{ bootstrap_node_network | nthhost(1) }#/32"
#% endif %#
peerASN: #{ bootstrap_bgp.peer_asn }#
#% endif %#
serviceSelector:
matchExpressions:
- {key: somekey, operator: NotIn, values: ['never-used-value']}
---
apiVersion: cilium.io/v2alpha1
kind: CiliumLoadBalancerIPPool
metadata:
name: l3-pool
spec:
allowFirstLastIPs: "Yes"
blocks:
- cidr: "${BGP_ADVERTISED_CIDR}"
#% endif %#