From 32ffb5c8f5487cd99e84f47cebd4e0997d0a1fa0 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 5 May 2024 14:22:50 +0200 Subject: k8s: fix metallb config resources not being applied --- k8s/helmsman.yml | 11 ++++++++++- k8s/metallb-config/Chart.yaml | 24 ++++++++++++++++++++++++ k8s/metallb-config/templates/metallb.yml | 14 ++++++++++++++ k8s/metallb.yml | 14 -------------- 4 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 k8s/metallb-config/Chart.yaml create mode 100644 k8s/metallb-config/templates/metallb.yml delete mode 100644 k8s/metallb.yml diff --git a/k8s/helmsman.yml b/k8s/helmsman.yml index 6cf4e26..7dfd0ea 100644 --- a/k8s/helmsman.yml +++ b/k8s/helmsman.yml @@ -14,7 +14,16 @@ apps: wait: true chart: oci://registry-1.docker.io/bitnamicharts/metallb version: 6.1.3 - valuesFile: metallb.yml + priority: -5 + + # When deleting the resource this will get stuck as it should be deleted before "metallib". + # To fix it, run: k delete secret sh.helm.release.v1.metallb-config.v1 + metallb-config: + namespace: metallb-system + enabled: true + wait: true + chart: metallb-config + version: 0.1.0 priority: -4 kafka: diff --git a/k8s/metallb-config/Chart.yaml b/k8s/metallb-config/Chart.yaml new file mode 100644 index 0000000..1254f93 --- /dev/null +++ b/k8s/metallb-config/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: metallb-config +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/k8s/metallb-config/templates/metallb.yml b/k8s/metallb-config/templates/metallb.yml new file mode 100644 index 0000000..9dee7ef --- /dev/null +++ b/k8s/metallb-config/templates/metallb.yml @@ -0,0 +1,14 @@ +apiVersion: metallb.io/v1beta1 +kind: IPAddressPool +metadata: + name: prod-pool + namespace: metallb-system +spec: + addresses: + - 192.168.11.0/24 +--- +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: simplel2 + namespace: metallb-system diff --git a/k8s/metallb.yml b/k8s/metallb.yml deleted file mode 100644 index 9dee7ef..0000000 --- a/k8s/metallb.yml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: metallb.io/v1beta1 -kind: IPAddressPool -metadata: - name: prod-pool - namespace: metallb-system -spec: - addresses: - - 192.168.11.0/24 ---- -apiVersion: metallb.io/v1beta1 -kind: L2Advertisement -metadata: - name: simplel2 - namespace: metallb-system -- cgit 1.4.1