Skip to content

Commit

Permalink
implement metallb manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Jun 4, 2024
1 parent 6b32d40 commit 6b4e6f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{{- if and (.Values.bgp.enabled) (eq .Values.driver "metallb") }}
apiVersion: "cilium.io/v2alpha1"
kind: CiliumBGPPeeringPolicy

{{- range .Values.bgp.neighbors }}
apiVersion: "metallb.io/v1beta2"
kind: BGPPeer
metadata:
name: {{ include "ck-loadbalancer.fullname" . }}
name: {{ include "ck-loadbalancer.fullname" $ }}
labels:
{{- include "ck-loadbalancer.labels" . | nindent 4 }}
{{- include "ck-loadbalancer.labels" $ | nindent 4 }}
spec:
virtualRouters:
- localASN: {{ .Values.bgp.localASN }}
serviceSelector:
matchExpressions:
- {key: somekey, operator: NotIn, values: ['never-used-value']}
{{- with .Values.bgp.neighbors }}
neighbors:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end}}
myASN: {{ $.Values.bgp.localASN }}
peerASN: {{ .peerASN }}
peerAddress: {{ .peerAddress }}
peerPort: {{ .peerPort }}
{{- end }}

{{- end }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if and (.Values.l2.enabled) (eq .Values.driver "metallb") }}
apiVersion: "cilium.io/v2alpha1"
kind: CiliumL2AnnouncementPolicy
apiVersion: "metallb.io/v1beta1"
kind: L2Advertisement
metadata:
name: {{ include "ck-loadbalancer.fullname" . }}
labels:
Expand All @@ -10,6 +10,4 @@ spec:
interfaces:
{{- toYaml . | nindent 4 }}
{{- end }}
externalIPs: true
loadBalancerIPs: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- if and (.Values.ipPool.cidrs) (eq .Values.driver "metallb") }}
apiVersion: "cilium.io/v2alpha1"
kind: CiliumLoadBalancerIPPool
apiVersion: "metallb.io/v1beta1"
kind: IPAddressPool
metadata:
name: {{ include "ck-loadbalancer.fullname" . }}
labels:
{{- include "ck-loadbalancer.labels" . | nindent 4 }}
spec:
{{- with .Values.ipPool.cidrs }}
blocks:
addresses:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

0 comments on commit 6b4e6f6

Please sign in to comment.