From 255675f9a010e807f9f426a7f00b534224046645 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Tue, 13 Sep 2022 16:16:16 +0200 Subject: [PATCH] Throw an error if metallb is configured during installation --- charts/enterprise/metallb/Chart.yaml | 2 +- charts/enterprise/metallb/templates/bgpadvertisement.yaml | 3 +++ charts/enterprise/metallb/templates/community.yaml | 3 +++ charts/enterprise/metallb/templates/ipaddresspool.yaml | 3 +++ charts/enterprise/metallb/templates/l2advertisement.yaml | 3 +++ charts/enterprise/metallb/templates/peers.yaml | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/enterprise/metallb/Chart.yaml b/charts/enterprise/metallb/Chart.yaml index 86bfb8c8a76..22dd13d79da 100644 --- a/charts/enterprise/metallb/Chart.yaml +++ b/charts/enterprise/metallb/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://github.com/metallb/metallb - https://metallb.universe.tf type: application -version: 4.0.5 +version: 4.0.6 annotations: truecharts.org/catagories: | - core diff --git a/charts/enterprise/metallb/templates/bgpadvertisement.yaml b/charts/enterprise/metallb/templates/bgpadvertisement.yaml index 38ff48cd7d9..0b8d3b3fbbf 100644 --- a/charts/enterprise/metallb/templates/bgpadvertisement.yaml +++ b/charts/enterprise/metallb/templates/bgpadvertisement.yaml @@ -1,4 +1,7 @@ {{- range .Values.BGPAdvertisements }} +{{- if .Release.IsInstall }} +{{- fail "Please only add MetalLB configuration after initial installation" }} +{{- end }} --- apiVersion: metallb.io/v1beta1 kind: BGPAdvertisement diff --git a/charts/enterprise/metallb/templates/community.yaml b/charts/enterprise/metallb/templates/community.yaml index c73e32133f2..882ae519be7 100644 --- a/charts/enterprise/metallb/templates/community.yaml +++ b/charts/enterprise/metallb/templates/community.yaml @@ -1,4 +1,7 @@ {{- if .Values.Communities }} +{{- if .Release.IsInstall }} +{{- fail "Please only add MetalLB configuration after initial installation" }} +{{- end }} --- apiVersion: metallb.io/v1beta1 kind: Community diff --git a/charts/enterprise/metallb/templates/ipaddresspool.yaml b/charts/enterprise/metallb/templates/ipaddresspool.yaml index 3ab5ca4ab7c..b48cfd093dc 100644 --- a/charts/enterprise/metallb/templates/ipaddresspool.yaml +++ b/charts/enterprise/metallb/templates/ipaddresspool.yaml @@ -1,4 +1,7 @@ {{- range .Values.ipAddressPools }} +{{- if .Release.IsInstall }} +{{- fail "Please only add MetalLB configuration after initial installation" }} +{{- end }} --- apiVersion: metallb.io/v1beta1 kind: IPAddressPool diff --git a/charts/enterprise/metallb/templates/l2advertisement.yaml b/charts/enterprise/metallb/templates/l2advertisement.yaml index 3e76bff79b5..8ac5ffa18dc 100644 --- a/charts/enterprise/metallb/templates/l2advertisement.yaml +++ b/charts/enterprise/metallb/templates/l2advertisement.yaml @@ -1,4 +1,7 @@ {{- range .Values.L2Advertisements }} +{{- if .Release.IsInstall }} +{{- fail "Please only add MetalLB configuration after initial installation" }} +{{- end }} --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement diff --git a/charts/enterprise/metallb/templates/peers.yaml b/charts/enterprise/metallb/templates/peers.yaml index a9bfa24d7cf..91bc888cf88 100644 --- a/charts/enterprise/metallb/templates/peers.yaml +++ b/charts/enterprise/metallb/templates/peers.yaml @@ -1,4 +1,7 @@ {{- range .Values.Peers }} +{{- if .Release.IsInstall }} +{{- fail "Please only add MetalLB configuration after initial installation" }} +{{- end }} --- apiVersion: metallb.io/v1beta2 kind: BGPPeer