k8s/003-cert-manager/install.sh

56 lines
1.1 KiB
Bash
Raw Normal View History

2022-07-02 18:47:08 +00:00
#!/bin/bash
CHART_VERSION=1.9.1
2022-07-02 18:47:08 +00:00
NAMESPACE=cert-manager
EMAIL=amarpreet@minhas.io
kubectl create ns ${NAMESPACE}
#kubectl create serviceaccount -n ${NAMESPACE} cert-manager
2022-07-02 18:47:08 +00:00
helm repo add jetstack https://charts.jetstack.io
helm repo update
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
kubectl apply -n ${NAMESPACE} -f serviceaccounttoken.yaml
./vault-role.sh
2022-07-02 18:47:08 +00:00
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
rm -rf cert-manager-webhook-namecheap
2022-07-02 21:37:54 +00:00
kubectl apply -f issuers.yaml