From 546681e5a88da0ddd6abf8f767046b775a171046 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 5 Jun 2024 12:40:45 +0200 Subject: [PATCH] fix: wait for pod before exec commands --- manifests/bin/deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index 2f0b941..4083bdf 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -61,6 +61,7 @@ kcreatesec gitea-admin \ --from-literal=password="$GITEA_PASSWORD" kubectl run --image "$IMAGEAPP" secrets sleep 60 & &> /dev/null +kubectl wait --timeout=5m --for=condition=ready pod secrets 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)" \