From 7d50d4606ee7ce93c868d362147926f656fd2035 Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 22 Dec 2024 05:59:46 +0000 Subject: [PATCH] fix: kubectl run --- manifests/bin/deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index e30e998..76318a6 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -1,6 +1,7 @@ -#!/bin/bash -ex +#!/bin/bash -e set -o pipefail +set -x function kapply() { for f in "$@"; do kubectl apply -f \ @@ -47,7 +48,7 @@ export POSTGRES_USER; POSTGRES_USER="$(kgseckey postgres-app user)" export POSTGRES_PASSWORD; POSTGRES_PASSWORD="$(kgseckey postgres-app password)" # shellcheck disable=SC1090,SC2016 -. <(kubectl run -i --rm --image "$IMAGEAPP" secrets -- echo SECRET_KEY='$(gitea generate secret SECRET_KEY)' INTERNAL_TOKEN='$(gitea generate secret INTERNAL_TOKEN)' JWT_SECRET='$(gitea generate secret JWT_SECRET)') +. <(kubectl run -i --rm --image "docker.io/gitea/gitea:1.22.6-rootless" secrets -- bash <<< 'echo SECRET_KEY="$(gitea generate secret SECRET_KEY)" INTERNAL_TOKEN="$(gitea generate secret INTERNAL_TOKEN)" JWT_SECRET="$(gitea generate secret JWT_SECRET)"') kcreate gitea \ --from-literal=secret_key="$(kgseckey gitea secret_key || echo "$SECRET_KEY")" \