From 0ab294fad4e672bdf643ee1445ab46b2ea564d13 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 2 Jul 2022 14:41:57 -0400 Subject: [PATCH] Add metallb --- 000-scripts/vault-k8s-auth-endpoint.sh | 1 + 001-metallb/install.sh | 13 +++++++++++++ 001-metallb/uninstall.sh | 4 ++++ 001-metallb/values.yaml | 6 ++++++ 4 files changed, 24 insertions(+) create mode 100755 001-metallb/install.sh create mode 100755 001-metallb/uninstall.sh create mode 100644 001-metallb/values.yaml diff --git a/000-scripts/vault-k8s-auth-endpoint.sh b/000-scripts/vault-k8s-auth-endpoint.sh index e74778a..e17db44 100755 --- a/000-scripts/vault-k8s-auth-endpoint.sh +++ b/000-scripts/vault-k8s-auth-endpoint.sh @@ -7,4 +7,5 @@ kubectl config view --raw --minify --flatten --output='jsonpath={.clusters[].clu vault write auth/kubernetes/config \ kubernetes_host=https://${HOST_IP}:6443 \ kubernetes_ca_cert=@ca.crt + rm ca.crt diff --git a/001-metallb/install.sh b/001-metallb/install.sh new file mode 100755 index 0000000..a6f3bb2 --- /dev/null +++ b/001-metallb/install.sh @@ -0,0 +1,13 @@ +#!/bin/bash +CHART_VERSION=0.11.0 + +helm repo add metallb https://metallb.github.io/metallb +helm repo update +helm upgrade --install \ + metallb \ + metallb/metallb \ + -f values.yaml \ + -n metallb-system \ + --version ${CHART_VERSION} \ + --create-namespace \ + --cleanup-on-fail diff --git a/001-metallb/uninstall.sh b/001-metallb/uninstall.sh new file mode 100755 index 0000000..368a888 --- /dev/null +++ b/001-metallb/uninstall.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +helm uninstall metallb -n metallb-system +kubectl delete ns metallb-system diff --git a/001-metallb/values.yaml b/001-metallb/values.yaml new file mode 100644 index 0000000..b308799 --- /dev/null +++ b/001-metallb/values.yaml @@ -0,0 +1,6 @@ +configInline: + address-pools: + - name: default + protocol: layer2 + addresses: + - 192.168.0.200-192.168.0.210