Skip to content

The Unified and Autonomous Development Platform

Modify k8s deployments not to hard code namespace

Steveef15409c0253
diff --git a/server-product/build/k8s/base/cluster-role-bindings.yaml b/server-product/build/k8s/base/cluster-role-bindings.yaml
index 0704a4db19..bfac591837 100644
--- a/server-product/build/k8s/base/cluster-role-bindings.yaml
+++ b/server-product/build/k8s/base/cluster-role-bindings.yaml
@@ -5,7 +5,6 @@ metadata:
subjects:
- kind: ServiceAccount
name: onedev
- namespace: onedev
roleRef:
kind: ClusterRole
name: onedev
diff --git a/server-product/build/k8s/base/kustomization.yaml b/server-product/build/k8s/base/kustomization.yaml
index 4f58af92f2..d6dc2bc089 100644
--- a/server-product/build/k8s/base/kustomization.yaml
+++ b/server-product/build/k8s/base/kustomization.yaml
@@ -6,7 +6,6 @@ secretGenerator:
literals:
- password=changeit
resources:
-- namespaces.yaml
- service-accounts.yaml
- cluster-roles.yaml
- cluster-role-bindings.yaml
diff --git a/server-product/build/k8s/base/namespaces.yaml b/server-product/build/k8s/base/namespaces.yaml
deleted file mode 100644
index 053687d32e..0000000000
--- a/server-product/build/k8s/base/namespaces.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-apiVersion: v1
-kind: Namespace
-metadata:
- name: onedev
diff --git a/server-product/build/k8s/mini/kustomization.yaml b/server-product/build/k8s/mini/kustomization.yaml
index 285b137210..e8c0f6e8f9 100644
--- a/server-product/build/k8s/mini/kustomization.yaml
+++ b/server-product/build/k8s/mini/kustomization.yaml
@@ -1,4 +1,3 @@
-namespace: onedev
images:
- name: 1dev/server
newTag: ${buildVersion}
diff --git a/server-product/build/k8s/production/kustomization.yaml b/server-product/build/k8s/production/kustomization.yaml
index a88a03c067..0e678be124 100644
--- a/server-product/build/k8s/production/kustomization.yaml
+++ b/server-product/build/k8s/production/kustomization.yaml
@@ -1,4 +1,3 @@
-namespace: onedev
bases:
- ../base
commonLabels:
diff --git a/server-product/build/k8s/ssl/kustomization.yaml b/server-product/build/k8s/ssl/kustomization.yaml
index 2943f61a14..8ea50cbf28 100644
--- a/server-product/build/k8s/ssl/kustomization.yaml
+++ b/server-product/build/k8s/ssl/kustomization.yaml
@@ -1,4 +1,3 @@
-namespace: onedev
bases:
- ../production
configMapGenerator:
diff --git a/server-product/build/k8s/trust-certs/kustomization.yaml b/server-product/build/k8s/trust-certs/kustomization.yaml
index e63e220439..cf5e54eb32 100644
--- a/server-product/build/k8s/trust-certs/kustomization.yaml
+++ b/server-product/build/k8s/trust-certs/kustomization.yaml
@@ -1,4 +1,3 @@
-namespace: onedev
bases:
- ../production
configMapGenerator: