forked from swisscom/kubeone-dcs-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcert-manager.sh
More file actions
executable file
·38 lines (35 loc) · 925 Bytes
/
Copy pathcert-manager.sh
File metadata and controls
executable file
·38 lines (35 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
set -u
set -o pipefail
if [[ "$(basename ${PWD})" == "deployments" ]]; then
cd ..
fi
# chart source: https://github.com/cert-manager/cert-manager
repository="https://charts.jetstack.io"
chart="cert-manager"
version="v1.12.2"
namespace="${chart}"
cat > "deployments/${chart}.values.yaml" <<EOF
installCRDs: true
EOF
deployments/install-chart.sh "${repository}" "${chart}" "${namespace}" "${version}" "deployments/${chart}.values.yaml"
echo " "
# additional configuration, add a ClusterIssuer
cat > "deployments/${chart}.cluster-issuer.yaml" <<EOF
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: lets-encrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: lets-encrypt
solvers:
- http01:
ingress:
class: nginx
EOF
kubectl -n ${namespace} apply -f "deployments/${chart}.cluster-issuer.yaml"