Skip to content

The Unified and Autonomous Development Platform

Use default namespace "onedev" in k8s deployment resources

Robin Shen0b770edbd1c3
diff --git a/server-product/build/k8s/base/kustomization.yaml b/server-product/build/k8s/base/kustomization.yaml
index d6dc2bc089..4f58af92f2 100644
--- a/server-product/build/k8s/base/kustomization.yaml
+++ b/server-product/build/k8s/base/kustomization.yaml
@@ -6,6 +6,7 @@ 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
new file mode 100644
index 0000000000..375e40c424
--- /dev/null
+++ b/server-product/build/k8s/base/namespaces.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: onedev
\ No newline at end of file
diff --git a/server-product/build/k8s/maintenance/kustomization.yaml b/server-product/build/k8s/maintenance/kustomization.yaml
index af26dba09d..fd43ee329c 100644
--- a/server-product/build/k8s/maintenance/kustomization.yaml
+++ b/server-product/build/k8s/maintenance/kustomization.yaml
@@ -1,3 +1,4 @@
+namespace: onedev
bases:
- ../production
patchesStrategicMerge:
diff --git a/server-product/build/k8s/mini/kustomization.yaml b/server-product/build/k8s/mini/kustomization.yaml
index e8c0f6e8f9..285b137210 100644
--- a/server-product/build/k8s/mini/kustomization.yaml
+++ b/server-product/build/k8s/mini/kustomization.yaml
@@ -1,3 +1,4 @@
+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 0e678be124..a88a03c067 100644
--- a/server-product/build/k8s/production/kustomization.yaml
+++ b/server-product/build/k8s/production/kustomization.yaml
@@ -1,3 +1,4 @@
+namespace: onedev
bases:
- ../base
commonLabels:
diff --git a/server-product/build/k8s/ssl/kustomization.yaml b/server-product/build/k8s/ssl/kustomization.yaml
index 8ea50cbf28..2943f61a14 100644
--- a/server-product/build/k8s/ssl/kustomization.yaml
+++ b/server-product/build/k8s/ssl/kustomization.yaml
@@ -1,3 +1,4 @@
+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 cf5e54eb32..e63e220439 100644
--- a/server-product/build/k8s/trust-certs/kustomization.yaml
+++ b/server-product/build/k8s/trust-certs/kustomization.yaml
@@ -1,3 +1,4 @@
+namespace: onedev
bases:
- ../production
configMapGenerator: