From 24ecccd865443c667b4f369a1566eb503f302a9a Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Mon, 5 May 2025 09:39:34 -0700 Subject: [PATCH] Update namespace creation command to use apply for idempotency --- bin/deploy-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/deploy-service b/bin/deploy-service index 91afb27..41b2d82 100755 --- a/bin/deploy-service +++ b/bin/deploy-service @@ -126,7 +126,7 @@ NAMESPACE=$(grep -o "namespace: [a-zA-Z0-9_-]\+" "$TEMP_FILE" | head -1 | cut -d if [[ -n "$NAMESPACE" ]]; then # Create the namespace if it doesn't exist (using kubectl create which is idempotent with --dry-run=client) echo "Creating namespace $NAMESPACE if it doesn't exist..." - kubectl create namespace "$NAMESPACE" --dry-run=client | kubectl create -f - 2>/dev/null || true + kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f - # Copy certificates to the namespace copy-secret cert-manager:wildcard-internal-sovereign-cloud-tls $NAMESPACE copy-secret cert-manager:wildcard-sovereign-cloud-tls $NAMESPACE