62 lines
1.7 KiB
Makefile
62 lines
1.7 KiB
Makefile
set fallback:=true
|
|
|
|
export CERT_MANAGER_NAMESPACE := env("CERT_MANAGER_NAMESPACE", "cert-manager")
|
|
export TRAEFIK_NAMESPACE := env("TRAEFIK_NAMESPACE", "traefik")
|
|
|
|
add-helm-repos:
|
|
helm repo add traefik https://helm.traefik.io/traefik --force-update
|
|
helm repo add jetstack https://charts.jetstack.io --force-update
|
|
helm repo update
|
|
|
|
install:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
just env::check
|
|
|
|
just add-helm-repos
|
|
|
|
helm upgrade traefik traefik/traefik \
|
|
--install \
|
|
--cleanup-on-fail \
|
|
--namespace ${TRAEFIK_NAMESPACE} \
|
|
--create-namespace \
|
|
--values traefik-values.yaml
|
|
|
|
helm upgrade cert-manager jetstack/cert-manager \
|
|
--install \
|
|
--cleanup-on-fail \
|
|
--namespace ${CERT_MANAGER_NAMESPACE} \
|
|
--create-namespace \
|
|
--values cert-manager-values.yaml
|
|
|
|
uninstall:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
just env::check
|
|
|
|
helm uninstall traefik --namespace ${TRAEFIK_NAMESPACE} || true
|
|
helm uninstall cert-manager --namespace ${CERT_MANAGER_NAMESPACE} || true
|
|
|
|
setup-cluster-issuer:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
just env::check
|
|
gomplate -f cert-manager-issuer-secret-gomplate.yaml | kubectl apply -f -
|
|
gomplate -f cert-manager-cluster-issuer-gomplate.yaml | kubectl apply -f -
|
|
|
|
# Get status of cert-manager components
|
|
status:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
echo "=== cert-manager Components Status ==="
|
|
echo ""
|
|
echo "Namespace: ${CERT_MANAGER_NAMESPACE}"
|
|
echo ""
|
|
echo "Pods:"
|
|
kubectl get pods -n ${CERT_MANAGER_NAMESPACE}
|
|
echo ""
|
|
echo "Services:"
|
|
kubectl get services -n ${CERT_MANAGER_NAMESPACE}
|
|
echo ""
|
|
echo "CRDs:"
|
|
kubectl get crd | grep cert-manager.io
|