k8s/003-cert-manager/install.sh

52 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
CHART_VERSION=1.8.0
NAMESPACE=cert-manager
EMAIL=amarpreet@minhas.io
./vault-role.sh
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create ns ${NAMESPACE}
kubectl create serviceaccount -n ${NAMESPACE} cert-manager
kubectl apply -n ${NAMESPACE} -f external-secrets.yaml
helm upgrade --install \
cert-manager \
jetstack/cert-manager \
-f values.yaml \
-n ${NAMESPACE} \
--version ${CHART_VERSION} \
--set installCRDs=true \
--cleanup-on-fail
helm upgrade -install \
cert-manager-csi-driver \
jetstack/cert-manager-csi-driver \
-n ${NAMESPACE} \
--wait \
--cleanup-on-fail
git clone https://github.com/kelvie/cert-manager-webhook-namecheap
pushd cert-manager-webhook-namecheap
helm upgrade --install \
-n ${NAMESPACE} \
namecheap-webhook \
deploy/cert-manager-webhook-namecheap/ \
--wait \
--cleanup-on-fail
helm upgrade --install \
-n ${NAMESPACE} \
--set email=${EMAIL} \
letsencrypt-namecheap-issuer \
deploy/letsencrypt-namecheap-issuer/ \
--wait \
--cleanup-on-fail
popd
kubectl apply -f issuers.yaml