This commit is contained in:
parent
a0e8849beb
commit
5e83c6fa89
@ -46,13 +46,20 @@ export POSTGRES_DB; POSTGRES_DB="$(kgseckey postgres-app dbname)"
|
|||||||
export POSTGRES_USER; POSTGRES_USER="$(kgseckey postgres-app user)"
|
export POSTGRES_USER; POSTGRES_USER="$(kgseckey postgres-app user)"
|
||||||
export POSTGRES_PASSWORD; POSTGRES_PASSWORD="$(kgseckey postgres-app password)"
|
export POSTGRES_PASSWORD; POSTGRES_PASSWORD="$(kgseckey postgres-app password)"
|
||||||
|
|
||||||
kubectl run --image "$IMAGEAPP" secrets sleep 600
|
# shellcheck disable=SC1090
|
||||||
sleep 5
|
. <(kubectl run -i --rm --image "$IMAGEAPP" secrets -- bash <<EOF
|
||||||
kcreatesec gitea \
|
CAT <<FOF
|
||||||
--from-literal=secret_key="$(kgseckey gitea secret_key || kubectl exec secrets -- gitea generate secret SECRET_KEY)" \
|
SECRET_KEY="\$(gitea generate secret SECRET_KEY)"
|
||||||
--from-literal=internal_token="$(kgseckey gitea internal_token || kubectl exec secrets -- gitea generate secret INTERNAL_TOKEN)" \
|
INTERNAL_TOKEN="\$(gitea generate secret INTERNAL_TOKEN)"
|
||||||
--from-literal=oauth2_jwt_secret="$(kgseckey gitea oauth2_jwt_secret || kubectl exec secrets -- gitea generate secret JWT_SECRET)"
|
JWT_SECRET="\$(gitea generate secret JWT_SECRET)"
|
||||||
kubectl delete pod secrets
|
FOF
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
kcreate gitea \
|
||||||
|
--from-literal=secret_key="$(kgseckey gitea secret_key || echo "$SECRET_KEY")" \
|
||||||
|
--from-literal=internal_token="$(kgseckey gitea internal_token || echo "$INTERNAL_TOKEN")" \
|
||||||
|
--from-literal=oauth2_jwt_secret="$(kgseckey gitea oauth2_jwt_secret || echo "$JWT_SECRET")"
|
||||||
|
|
||||||
kcreatecm gitea \
|
kcreatecm gitea \
|
||||||
--from-file=app.ini=<(envsubst "$(env | xargs printf '$%s ')" < config/app.ini)
|
--from-file=app.ini=<(envsubst "$(env | xargs printf '$%s ')" < config/app.ini)
|
||||||
|
Loading…
Reference in New Issue
Block a user