TrueChartsClone/charts/enterprise/metallb/templates/peers.yaml

52 lines
1.0 KiB
YAML
Raw Normal View History

{{- range .Values.Peers }}
2022-09-13 18:17:28 +00:00
{{- if $.Release.IsInstall }}
{{- fail "Please only add MetalLB configuration after initial installation" }}
{{- end }}
---
apiVersion: metallb.io/v1beta2
kind: BGPPeer
metadata:
name: {{ .name }}
spec:
{{- with .password }}
password: {{ . }}
{{- end }}
{{- with .routerID }}
routerID: {{ . }}
{{- end }}
{{- with .bfdProfile }}
bfdProfile: {{ . }}
{{- end }}
{{- with .ebgpMultiHop }}
ebgpMultiHop: {{ . }}
{{- end }}
{{- with .holdTime }}
holdTime: {{ . }}
{{- end }}
{{- with .keepaliveTime }}
keepaliveTime: {{ . }}
{{- end }}
{{- with .myASN }}
myASN: {{ . }}
{{- end }}
{{- with .peerASN }}
peerASN: {{ . | int }}
{{- end }}
{{- with .peerAddress }}
peerAddress: {{ . }}
{{- end }}
{{- with .peerPort }}
peerPort: {{ . | int }}
{{- end }}
{{- with .sourceAddress }}
sourceAddress: {{ . }}
{{- end }}
{{- if .nodeSelectors }}
nodeSelectors:
{{- range .nodeSelectors }}
- matchLabels:
kubernetes.io/hostname: {{ . }}
{{- end }}
{{- end }}
{{- end }}