This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_certificates() { | |
local envType=$1 | |
local secretName ns | |
kubectl apply -f <(sops -d cert-manager-utils/01-clouddns-service-account.yaml) | |
kubectl apply -f <(sops -d cert-manager-utils/01-cloudflare-api-key.yaml) | |
kubectl apply -f cert-manager-utils/02-clusterissuer-${envType}.yaml | |
kubectl apply -f cert-manager-utils/03-cluster-certificate-${envType}.yaml | |
# get the secret name | |
secretName=$(cat cert-manager-utils/03-cluster-certificate-${envType}.yaml | docker run -i --rm evns/yq yq -r '.spec.secretName') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
function cleanUp() { | |
local exitCode=$? | |
[ $exitCode -ne 0 ] && echo "ERROR: The script is exiting with an error. Please check the logs above." | |
[ -f "${myJceZip:-}" ] && echo "CLEANUP: Cleaning up jce zip..." && rm -f "${myJceZip}" |
NewerOlder