TrueChartsCatalogClone/enterprise/metallb-config/3.0.11/templates/_bgpadvertisement.tpl

34 lines
660 B
Smarty
Raw Normal View History

2023-08-01 09:25:32 +00:00
{{- define "metallb.bgpadv" -}}
{{- range .Values.BGPAdvertisements }}
---
apiVersion: metallb.io/v1beta1
kind: BGPAdvertisement
metadata:
name: {{ .name }}
namespace: {{ $.Values.operatorNamespace }}
spec:
ipAddressPools:
{{- range .addressPools }}
- {{ . }}
{{- end }}
{{- with .aggregationLength }}
aggregationLength: {{ . | int }}
{{- end }}
{{- with .localpref }}
localpref: {{ . | int }}
{{- end }}
{{- if .communities }}
communities:
{{- range .communities }}
- {{ . }}
{{- end }}
{{- end }}
{{- if .peers }}
peers:
{{- range .peers }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}