From c1847e91b3f502aa89ca86eb821ed7bd1a2219e0 Mon Sep 17 00:00:00 2001 From: Prodiglagla <348945921@qq.com> Date: Sun, 14 Jun 2026 12:15:18 +0800 Subject: [PATCH] fix prod secret preparation namespace check --- scripts/prepare-prod-secrets.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/prepare-prod-secrets.ps1 b/scripts/prepare-prod-secrets.ps1 index 477c4c6..aa29c35 100644 --- a/scripts/prepare-prod-secrets.ps1 +++ b/scripts/prepare-prod-secrets.ps1 @@ -15,8 +15,8 @@ function New-Base64SecretValue([int]$Bytes = 48) { return [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes([Convert]::ToBase64String($buffer))) } -kubectl get namespace $NewNamespace *> $null -if ($LASTEXITCODE -ne 0) { +$namespaceName = kubectl get namespace $NewNamespace --ignore-not-found -o name +if (-not $namespaceName) { kubectl create namespace $NewNamespace | Out-Null }