feat: gitea manifests
This commit is contained in:
parent
e1abb674d0
commit
c245e46383
9 changed files with 143 additions and 7 deletions
36
manifests/bin/deploy.sh
Executable file
36
manifests/bin/deploy.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue