fix: resolve kustomize namespace conflict for gooseek-sandbox
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Failing after 7m34s

- Extracted gooseek-sandbox Namespace to separate file
- Apply sandbox-namespace.yaml separately before kustomize
- Fixed deprecated commonLabels -> labels
- Prevents namespace transformation conflict

Made-with: Cursor
This commit is contained in:
home
2026-03-02 21:38:49 +03:00
parent 0053ba251d
commit c3965a2c6a
4 changed files with 15 additions and 11 deletions

View File

@@ -52,6 +52,9 @@ jobs:
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
cd /opt/gitea-runner/workspace/gooseek/backend/deploy/k8s
# Apply sandbox namespace separately (not managed by kustomize)
kubectl apply -f sandbox-namespace.yaml
kubectl apply -k .
kubectl -n gooseek rollout restart deployment/api-gateway || true

View File

@@ -26,9 +26,11 @@ resources:
- opensandbox.yaml
- ingress.yaml
commonLabels:
app.kubernetes.io/part-of: gooseek
app.kubernetes.io/managed-by: kustomize
labels:
- pairs:
app.kubernetes.io/part-of: gooseek
app.kubernetes.io/managed-by: kustomize
includeSelectors: false
images:
- name: gooseek/backend

View File

@@ -1,12 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: gooseek-sandbox
labels:
app.kubernetes.io/part-of: gooseek
purpose: user-sandboxes
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: opensandbox-sa

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: gooseek-sandbox
labels:
app.kubernetes.io/part-of: gooseek
purpose: user-sandboxes