fix: wait for pod before exec commands

This commit is contained in:
ange 2024-06-05 12:40:45 +02:00
parent ab2c428d9d
commit 546681e5a8
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -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)" \