From 5e83c6fa8933297a95626b10281aa5d5c097eada Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 22 Dec 2024 05:43:37 +0000 Subject: [PATCH] fix: unstable secret generation --- manifests/bin/deploy.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index 2f10d1e..f09219b 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -46,13 +46,20 @@ export POSTGRES_DB; POSTGRES_DB="$(kgseckey postgres-app dbname)" export POSTGRES_USER; POSTGRES_USER="$(kgseckey postgres-app user)" export POSTGRES_PASSWORD; POSTGRES_PASSWORD="$(kgseckey postgres-app password)" -kubectl run --image "$IMAGEAPP" secrets sleep 600 -sleep 5 -kcreatesec gitea \ - --from-literal=secret_key="$(kgseckey gitea secret_key || kubectl exec secrets -- gitea generate secret SECRET_KEY)" \ - --from-literal=internal_token="$(kgseckey gitea internal_token || kubectl exec secrets -- gitea generate secret INTERNAL_TOKEN)" \ - --from-literal=oauth2_jwt_secret="$(kgseckey gitea oauth2_jwt_secret || kubectl exec secrets -- gitea generate secret JWT_SECRET)" -kubectl delete pod secrets +# shellcheck disable=SC1090 +. <(kubectl run -i --rm --image "$IMAGEAPP" secrets -- bash <