fix prod secret preparation namespace check

This commit is contained in:
Prodiglagla
2026-06-14 12:15:18 +08:00
parent f83d1157b1
commit c1847e91b3
+2 -2
View File
@@ -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
}