From 849acf3405c993a993d12dd17a4506b659ae1db2 Mon Sep 17 00:00:00 2001 From: mfordjody <11638005@qq.com> Date: Sun, 22 Sep 2024 10:49:07 +0800 Subject: [PATCH] [charts] add (#363) --- deploy/charts/admin/templates/admin/admin-ns.yaml | 8 ++++++++ deploy/charts/admin/templates/custom/_namespaces.tpl | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 deploy/charts/admin/templates/admin/admin-ns.yaml diff --git a/deploy/charts/admin/templates/admin/admin-ns.yaml b/deploy/charts/admin/templates/admin/admin-ns.yaml new file mode 100644 index 000000000..cfe6d0a39 --- /dev/null +++ b/deploy/charts/admin/templates/admin/admin-ns.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: {{ template "admin.namespace" . }} + labels: + {{- include "admin.labels" . | nindent 4 }} + + diff --git a/deploy/charts/admin/templates/custom/_namespaces.tpl b/deploy/charts/admin/templates/custom/_namespaces.tpl index 66c1dea5b..db10b5ea2 100644 --- a/deploy/charts/admin/templates/custom/_namespaces.tpl +++ b/deploy/charts/admin/templates/custom/_namespaces.tpl @@ -4,8 +4,8 @@ Return Admin Namespace to use. {{- define "admin.namespace" -}} {{- if .Values.namespaceOverride }} {{- .Values.namespaceOverride }} -{{- else -}} -{{- .Release.Namespace }} +{{- else if not (empty .Release.Namespace) -}} +{{- "dubbo-system" | default }} {{- end }} {{- end }}