Skip to content

Instantly share code, notes, and snippets.

View sboardwell's full-sized avatar

Steve Boardwell sboardwell

  • CloudBees
  • Berlin
View GitHub Profile
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')
@sboardwell
sboardwell / install-jce.sh
Last active October 13, 2017 07:09
Utils for installing JCE in java dirs or JDK tar.gz archives
#!/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}"