This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new d910e5d1 [charts] Update admin pod template (#734)
d910e5d1 is described below
commit d910e5d13eeb1b6c4ca592e5b9729c1205c59077
Author: Jian Zhong <[email protected]>
AuthorDate: Fri Jun 20 16:34:29 2025 +0800
[charts] Update admin pod template (#734)
---
manifests/charts/admin/templates/_pod.tpl | 48 ++++++++++++++++++++++++
manifests/charts/admin/templates/configmap.yaml | 18 ++++-----
manifests/charts/admin/templates/deployment.yaml | 46 +----------------------
manifests/charts/admin/values.yaml | 19 +++++++++-
4 files changed, 74 insertions(+), 57 deletions(-)
diff --git a/manifests/charts/admin/templates/_pod.tpl
b/manifests/charts/admin/templates/_pod.tpl
new file mode 100644
index 00000000..48444602
--- /dev/null
+++ b/manifests/charts/admin/templates/_pod.tpl
@@ -0,0 +1,48 @@
+{{- define "admin.pod" -}}
+{{- $admin := .Values -}}
+serviceAccountName: admin-sa
+containers:
+- name: admin
+ image: "{{ $admin.image }}:{{ $admin.tag }}"
+ imagePullPolicy: IfNotPresent
+ args:
+ - --config-file=/var/lib/admin/dubbo-cp.yaml
+ ports:
+ - name: http
+ containerPort: 8888
+ readinessProbe:
+ httpGet:
+ path: /admin
+ port: 8888
+ initialDelaySeconds: 1
+ periodSeconds: 3
+ timeoutSeconds: 5
+ securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ runAsNonRoot: false
+ capabilities:
+ drop:
+ - ALL
+ volumeMounts:
+ - name: data
+ mountPath: /var/lib/admin
+ - name: config
+ mountPath: /var/lib/admin/dubbo-cp.yaml
+ subPath: dubbo-cp.yaml
+{{- with $admin.volumeMounts }}
+{{- toYaml . | nindent 10 }}
+{{- end }}
+resources:
+{{ toYaml $admin.resources | trim | indent 2 }}
+volumes:
+- name: data
+ emptyDir: {}
+- name: config
+ configMap:
+ name: admin-config
+ defaultMode: 0755
+{{- with $admin.volumes }}
+{{- toYaml . | nindent 6 }}
+{{- end }}
+{{- end -}}
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/configmap.yaml
b/manifests/charts/admin/templates/configmap.yaml
index 5e2109d0..9a742492 100644
--- a/manifests/charts/admin/templates/configmap.yaml
+++ b/manifests/charts/admin/templates/configmap.yaml
@@ -13,12 +13,8 @@ metadata:
app.kubernetes.io/name: "dashboard"
data:
dubbo-cp.yaml: |-
- # Support multi deploy status, see
https://github.com/apache/dubbo-kubernetes/blob/master/README.md
- # Available options: k8s(not supported yet), half, universal
- deployMode: half
- # Support multi-cluster
- # Available options: zone, global(not supported yet)
- mode: zone
+ deployMode: {{ .Values.deployMode }}
+ mode: {{ .Values.mode }}
store:
# Traditional Store support nacos and zookeeper
traditional:
@@ -44,7 +40,7 @@ data:
baseURL:
http://47.76.81.123:3000/d/f5f48f75-13ec-489b-88ae-635ae38d8618/instance
service:
baseURL:
http://47.76.81.123:3000/d/b2e178fb-ada3-4d5e-9f54-de99e7f07662/service
- prometheus: http://8.218.148.84:9090
+ prometheus: {{ .Values.prometheus }}
# grafana should custom configs below:
# [server]
# root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
@@ -54,8 +50,8 @@ data:
# allow_embedding = true
# [auth.anonymous]
# enabled = true
- grafana: http://47.76.81.123:3000/
+ grafana: {{ .Values.grafana }}
auth:
- user: admin
- password: Dubbo@2025
- expirationTime: 7200
\ No newline at end of file
+ user: {{ .Values.user }}
+ password: {{ .Values.password }}
+ expirationTime: {{ .Values.expirationTime }}
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/deployment.yaml
b/manifests/charts/admin/templates/deployment.yaml
index 99b79302..375c304e 100644
--- a/manifests/charts/admin/templates/deployment.yaml
+++ b/manifests/charts/admin/templates/deployment.yaml
@@ -34,48 +34,4 @@ spec:
release: {{ .Release.Name }}
app.kubernetes.io/name: "dashboard"
spec:
- serviceAccountName: admin-sa
- containers:
- - name: admin
- image: "{{ $admin.image }}:{{ $admin.tag }}"
- imagePullPolicy: IfNotPresent
- args:
- - --config-file=/var/lib/admin/dubbo-cp.yaml
- ports:
- - name: http
- containerPort: 8888
- readinessProbe:
- httpGet:
- path: /admin
- port: 8888
- initialDelaySeconds: 1
- periodSeconds: 3
- timeoutSeconds: 5
- securityContext:
- allowPrivilegeEscalation: false
- readOnlyRootFilesystem: true
- runAsNonRoot: true
- capabilities:
- drop:
- - ALL
- volumeMounts:
- - name: data
- mountPath: /var/lib/admin
- - name: config
- mountPath: /var/lib/admin/dubbo-cp.yaml
- subPath: dubbo-cp.yaml
- {{- with $admin.volumeMounts }}
- {{- toYaml . | nindent 10 }}
- {{- end }}
- resources:
-{{ toYaml $admin.resources | trim | indent 10 }}
- volumes:
- - name: data
- emptyDir: {}
- - name: config
- configMap:
- name: admin-config
- defaultMode: 0755
- {{- with $admin.volumes }}
- {{- toYaml . | nindent 6 }}
- {{- end }}
+ {{- include "admin.pod" . | nindent 6 }}
diff --git a/manifests/charts/admin/values.yaml
b/manifests/charts/admin/values.yaml
index 57bf162e..b3f42f2e 100644
--- a/manifests/charts/admin/values.yaml
+++ b/manifests/charts/admin/values.yaml
@@ -31,4 +31,21 @@ _internal_default_values_not_set:
memory: "512Mi"
requests:
cpu: "256m"
- memory: "512Mi"
\ No newline at end of file
+ memory: "512Mi"
+
+ # Support multi deploy status, see
https://github.com/apache/dubbo-kubernetes/blob/master/README.md
+ # Available options: k8s(not supported yet), half, universal
+ deployMode: half
+
+ # Support multi-cluster
+ # Available options: zone, global(not supported yet)
+ mode: zone
+
+ # dubbo-cp login
+ user: admin
+ password: Dubbo@2025
+ expirationTime: 7200
+
+ prometheus: http://prometheus.dubbo-system:9090
+
+ grafana: http://grafana.dubbo-system:3000
\ No newline at end of file