G-EIP-700-TLS-7-1-eip-steph.../website/manifests/bin/deploy.sh
ange df8cd1ea54
All checks were successful
/ mirror (push) Successful in 4s
/ deploy (push) Successful in 34s
Add pitch (#7)
Co-authored-by: stcb <21@stcb.cc>
Reviewed-on: #7
Co-authored-by: ange <ange@yw5n.com>
Co-committed-by: ange <ange@yw5n.com>
2024-12-20 09:43:39 +00:00

37 lines
759 B
Bash
Executable File

#!/bin/bash -e
set -o pipefail
function kapply() {
for f in "$@"; do
kubectl apply -f \
<(envsubst "$(env | xargs printf '$%s ')" < "manifests/$f")
done
}
function kcreatesec() {
kubectl create secret generic --save-config --dry-run=client -oyaml "$@" | kubectl apply -f-
}
function kcreatecm() {
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl apply -f-
}
function kgseckey() {
local sec="$1"; shift
local key="$1"; shift
kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d
}
function kgcmkey() {
local cm="$1"; shift
local key="$1"; shift
kubectl get configmap "$cm" -o jsonpath="{.data.$key}"
}
kapply common/app.yaml
kubectl rollout restart deployment app