fix: resolve kustomize namespace conflict for gooseek-sandbox
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Failing after 7m34s
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:
@@ -52,6 +52,9 @@ jobs:
|
|||||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||||
cd /opt/gitea-runner/workspace/gooseek/backend/deploy/k8s
|
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 apply -k .
|
||||||
|
|
||||||
kubectl -n gooseek rollout restart deployment/api-gateway || true
|
kubectl -n gooseek rollout restart deployment/api-gateway || true
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ resources:
|
|||||||
- opensandbox.yaml
|
- opensandbox.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
|
||||||
commonLabels:
|
labels:
|
||||||
|
- pairs:
|
||||||
app.kubernetes.io/part-of: gooseek
|
app.kubernetes.io/part-of: gooseek
|
||||||
app.kubernetes.io/managed-by: kustomize
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
includeSelectors: false
|
||||||
|
|
||||||
images:
|
images:
|
||||||
- name: gooseek/backend
|
- name: gooseek/backend
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: gooseek-sandbox
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/part-of: gooseek
|
|
||||||
purpose: user-sandboxes
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: opensandbox-sa
|
name: opensandbox-sa
|
||||||
|
|||||||
7
backend/deploy/k8s/sandbox-namespace.yaml
Normal file
7
backend/deploy/k8s/sandbox-namespace.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: gooseek-sandbox
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: gooseek
|
||||||
|
purpose: user-sandboxes
|
||||||
Reference in New Issue
Block a user