Reviewed-on: #5
This commit is contained in:
parent
5f590e1813
commit
9f5d8482f4
2
.env
2
.env
@ -1,2 +1,2 @@
|
|||||||
PROD_URL=chat.gmoker.com
|
PROD_URL=chat.gmoker.com
|
||||||
IMAGEAPP=docker.io/vectorim/element-web:v1.11.78
|
IMAGEAPP=docker.io/vectorim/element-web:v1.11.89
|
||||||
|
@ -6,4 +6,4 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/app/config.json:ro
|
- ./config/config.json:/app/config.json:ro
|
||||||
|
@ -3,32 +3,35 @@ set -o pipefail
|
|||||||
|
|
||||||
function kapply() {
|
function kapply() {
|
||||||
for f in "$@"; do
|
for f in "$@"; do
|
||||||
kubectl apply -f \
|
kubectl apply -f <(envsubst < "manifests/$f")
|
||||||
<(envsubst "$(env | xargs printf '$%s ')" < "manifests/$f")
|
|
||||||
done
|
done
|
||||||
}
|
}; export -f kapply
|
||||||
|
|
||||||
function kcreatesec() {
|
function kcreatesec() {
|
||||||
kubectl create secret generic --save-config --dry-run=client -oyaml "$@" | kubectl apply -f-
|
kubectl create secret generic --dry-run=client -oyaml "$@" | kubectl replace -f-
|
||||||
}
|
}; export -f kcreatesec
|
||||||
|
|
||||||
function kcreatecm() {
|
function kcreatecm() {
|
||||||
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl apply -f-
|
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl replace -f-
|
||||||
}
|
}; export -f kcreatecm
|
||||||
|
|
||||||
function kgseckey() {
|
function kgseckey() {
|
||||||
local sec="$1"; shift
|
local sec="$1"; shift
|
||||||
local key="$1"; shift
|
local key="$1"; shift
|
||||||
|
|
||||||
kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d
|
if ! kubectl get secret "$sec" -ojson | jq -re ".data.\"$key\" // empty" | base64 -d; then
|
||||||
}
|
return 1
|
||||||
|
fi
|
||||||
|
}; export -f kgseckey
|
||||||
|
|
||||||
function kgcmkey() {
|
function kgcmkey() {
|
||||||
local cm="$1"; shift
|
local cm="$1"; shift
|
||||||
local key="$1"; shift
|
local key="$1"; shift
|
||||||
|
|
||||||
kubectl get configmap "$cm" -o jsonpath="{.data.$key}"
|
if ! kubectl get configmap "$cm" -ojson | jq -re ".data.\"$key\" // empty"; then
|
||||||
}
|
return 1
|
||||||
|
fi
|
||||||
|
}; export -f kgcmkey
|
||||||
|
|
||||||
|
|
||||||
kcreatecm element --from-file=config/config.json
|
kcreatecm element --from-file=config/config.json
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
export NB_REPLICAS=1
|
export NB_REPLICAS=1
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
export NB_REPLICAS=3
|
export NB_REPLICAS=3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user