Skip to content

Commit

Permalink
feat(utils/k8s_scripts): Add InstallClusterIssuerZeroSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Aug 31, 2023
1 parent 77668c4 commit e56b39f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions utils/k8s_scripts/k8s_scripts_cert_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,41 @@ stringData:
api-token: `+cloudflareToken+`
EOF`, dry)
}

func InstallClusterIssuerZeroSSL(
email string,
keyId string,
keySecret string,
dry bool,
) {
sh(`cat <<EOF | kubectl apply -f -
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: zerossl
spec:
acme:
server: https://acme.zerossl.com/v2/DV90
email: `+email+`
privateKeySecretRef:
name: zerossl
externalAccountBinding:
keyID: `+keyId+`
keySecretRef:
name: zerossl-eab
key: secret
solvers:
- http01:
ingress:
class: nginx
EOF`, dry)
sh(`cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: zerossl-eab
namespace: cert-manager
stringData:
secret: `+keySecret+`
EOF`, dry)
}

0 comments on commit e56b39f

Please sign in to comment.