simplified the variables and removed redundant information

This commit is contained in:
2025-06-30 00:05:33 +02:00
parent d5032d4bb4
commit ab0dd018be
13 changed files with 428 additions and 110 deletions

View File

@ -1,46 +1,60 @@
#!/bin/bash
## Setup MetalLb repo
source .env
## Setup all the needed repos
helm repo add metallb https://metallb.github.io/metallb
helm repo add traefik https://traefik.github.io/charts
helm repo add jetstack https://charts.jetstack.io
helm repo add longhorn https://charts.longhorn.io
helm repo update
helm install metallb metallb/metallb -n metallb-system --create-namespace
## Let's install metallb!
helm install \
metallb metallb/metallb \
-n metallb-system \
--create-namespace
echo "Waiting for all the pods to start..."
kubectl wait --namespace metallb-system \
--for=condition=Ready pod \
--all \
--timeout=120s
--timeout=200s
## Apply the load-balancer IPs range
## Apply the load-balancer IPs
kubectl apply -f manifests/metallb/metallb-config.yaml
## Setup traefik repo
helm repo add traefik https://traefik.github.io/charts
helm repo update
## Let's install traefik!
helm install \
traefik traefik/traefik \
-n traefik \
-f ./manifests/traefik/values.yaml \
--create-namespace
## Setup certmanager repo
helm repo add jetstack https://charts.jetstack.io
helm repo update
## Let's install Cert-Manager!
helm install \
cert-manager jetstack/cert-manager \
-n cert-manager \
-f ./manifests/certmanager/values.yaml \
--create-namespace
## Set up the cloudflare API token.
## Set up the cloudflare API token secret
kubectl create secret generic cloudflare-api-token-secret \
--from-literal=api-token="$CF_API" \
-n=cert-manager
## Apply the cloudflare Issuer
kubectl apply -f ./manifests/certmanager/issuer-secret.yaml
kubectl apply -f ./manifests/certmanager/issuer.yaml
## Setup longhorn repo
helm repo add longhorn https://charts.longhorn.io
helm repo update
## Let's install longhorn!
helm install longhorn longhorn/longhorn -n longhorn-system --create-namespace
echo "Waiting for all the pods to start..."
@ -51,5 +65,6 @@ kubectl wait --namespace longhorn-system \
--timeout=120s
## Apply ingress rule and certificate
kubectl apply -f manifests/longhorn/certificate.yaml
kubectl apply -f manifests/longhorn/ingress.yaml