1- # Licensed to the Apache Software Foundation (ASF) under one or more
2- # contributor license agreements. See the NOTICE file distributed with
3- # this work for additional information regarding copyright ownership.
4- # The ASF licenses this file to You under the Apache License, Version 2.0
5- # (the "License"); you may not use this file except in compliance with
6- # the License. You may obtain a copy of the License at
7- #
8- # http://www.apache.org/licenses/LICENSE-2.0
9- #
10- # Unless required by applicable law or agreed to in writing, software
11- # distributed under the License is distributed on an "AS IS" BASIS,
12- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- # See the License for the specific language governing permissions and
14- # limitations under the License.
15-
1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
1616apiVersion : apps/v1
1717kind : Deployment
1818metadata :
1919 name : dubbo-admin
20+ namespace : dubbo-system
2021 labels :
2122 app : dubbo-admin
2223spec :
23- replicas : 2
24+ replicas : 1
2425 selector :
2526 matchLabels :
2627 app : dubbo-admin
@@ -30,26 +31,132 @@ spec:
3031 labels :
3132 app : dubbo-admin
3233 spec :
34+ securityContext :
35+ runAsUser : 65532
36+ runAsGroup : 65532
37+ fsGroup : 65532
38+ runAsNonRoot : true
39+ serviceAccountName : dubbo-admin
3340 containers :
3441 - name : dubbo-admin
35- image :
42+ image : apache/dubbo-admin:0.7.0
3643 imagePullPolicy : IfNotPresent
44+ volumeMounts :
45+ - mountPath : /etc/dubbo-admin
46+ name : dubbo-admin-config
47+ readOnly : true
48+ - name : dubbo-admin-logs
49+ mountPath : /app/logs
50+ command :
51+ - /app/dubbo-admin
52+ args :
53+ - run
54+ - -c
55+ - /etc/dubbo-admin/dubbo-admin.yaml
56+ livenessProbe :
57+ httpGet :
58+ port : 5680
59+ path : /healthy
60+ scheme : HTTP
61+ initialDelaySeconds : 20
62+ periodSeconds : 10
63+ timeoutSeconds : 5
64+ successThreshold : 1
65+ failureThreshold : 3
66+ readinessProbe :
67+ httpGet :
68+ port : 5680
69+ path : /ready
70+ scheme : HTTP
71+ initialDelaySeconds : 10
72+ periodSeconds : 10
73+ timeoutSeconds : 5
74+ successThreshold : 1
75+ failureThreshold : 3
3776 ports :
3877 - containerPort : 8888
3978 protocol : TCP
4079 restartPolicy : Always
80+ volumes :
81+ - name : dubbo-admin-config
82+ configMap :
83+ name : dubbo-admin-config
84+ - name : dubbo-admin-logs
85+ # You can replace it with hostPath or pvc to store logs.
86+ emptyDir : { }
87+ ---
88+ apiVersion : v1
89+ kind : ConfigMap
90+ metadata :
91+ name : dubbo-admin-config
92+ namespace : dubbo-system
4193
94+ data :
95+ dubbo-admin.yaml : |
96+ observability:
97+ grafana: http://grafana.monitoringg.svc:3000
98+ prometheus: http://prometheus-k8s.monitoring.svc:9090/
99+ console:
100+ auth:
101+ user: admin
102+ password: dubbo@2025
103+ expirationTime: 3600
104+ discovery:
105+ - type: nacos2
106+ name: nacos2.5-standalone
107+ id: nacos2.5
108+ address:
109+ registry: nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos
110+ configCenter: nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos
111+ metadataReport: nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos
112+ engine:
113+ id: default
114+ name: default
115+ type: kubernetes
42116 ---
43117apiVersion : v1
44118kind : Service
45119metadata :
46120 name : dubbo-admin
47121 namespace : dubbo-system
48122spec :
49- type : NodePort
123+ type : ClusterIP
50124 selector :
51125 app : dubbo-admin
52126 ports :
53127 - protocol : TCP
54128 port : 8888
55- targetPort : 8888
129+ targetPort : 8888
130+
131+ ---
132+ apiVersion : rbac.authorization.k8s.io/v1
133+ kind : ClusterRole
134+ metadata :
135+ name : dubbo-admin-cluster-role
136+ rules :
137+ - apiGroups : [""]
138+ resources : ["pods", "services"]
139+ verbs : ["get", "list", "watch"]
140+ - apiGroups : ["apps"]
141+ resources : ["deployments", "statefulsets", "replicasets"]
142+ verbs : ["get", "list", "watch"]
143+ ---
144+ apiVersion : v1
145+ kind : ServiceAccount
146+ metadata :
147+ name : dubbo-admin
148+ namespace : dubbo-system
149+
150+ ---
151+ apiVersion : rbac.authorization.k8s.io/v1
152+ kind : ClusterRoleBinding
153+ metadata :
154+ name : dubbo-admin-cluster-binding
155+ subjects :
156+ - kind : ServiceAccount
157+ name : dubbo-admin
158+ namespace : dubbo-system
159+ roleRef :
160+ kind : ClusterRole
161+ name : dubbo-admin-cluster-role
162+ apiGroup : rbac.authorization.k8s.io
0 commit comments