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 a6b09103 [charts] Add dubbo resources dashboards (#530)
a6b09103 is described below

commit a6b09103bb969bd9eba440a987f94b44484f7f38
Author: Jian Zhong <11638...@qq.com>
AuthorDate: Sun Jan 12 16:48:21 2025 +0800

    [charts] Add dubbo resources dashboards (#530)
---
 docs/multicluster/design.md                        |  1 -
 manifests/charts/admin/README.md.gotmpl            | 21 ------
 .../files/dashboards/dubbo-resources-traces.yaml   | 74 +++++++++++++++++++
 .../{admin => dashboard}/certificates.yaml         |  0
 .../templates/{admin => dashboard}/configmap.yaml  |  0
 .../templates/{admin => dashboard}/deployment.yaml |  0
 .../{admin => dashboard}/networkpolicy.yaml        |  0
 .../persistentvolumeclaim.yaml                     |  0
 .../{admin => dashboard}/poddisruptionbudget.yaml  |  0
 .../{admin => dashboard}/podsecuritypolicy.yaml    |  0
 .../admin/templates/{admin => dashboard}/rbac.yaml |  0
 .../templates/{admin => dashboard}/service.yaml    |  0
 .../{admin => dashboard}/statefulset.yaml          |  0
 .../charts/admin/templates/exposer/deployment.yaml | 86 ----------------------
 .../admin/templates/exposer/ingress-class.yaml     | 11 ---
 .../charts/admin/templates/exposer/ingress.yaml    | 59 ---------------
 manifests/charts/admin/templates/exposer/rbac.yaml | 72 ------------------
 manifests/charts/admin/values.schema.json          | 15 ----
 18 files changed, 74 insertions(+), 265 deletions(-)

diff --git a/docs/multicluster/design.md b/docs/multicluster/design.md
deleted file mode 100644
index cd57254f..00000000
--- a/docs/multicluster/design.md
+++ /dev/null
@@ -1 +0,0 @@
-https://www.yuque.com/jiuan-c16st/ofzcvf/vownxi5dy4nzvmm5
diff --git a/manifests/charts/admin/README.md.gotmpl 
b/manifests/charts/admin/README.md.gotmpl
deleted file mode 100644
index c17b61e6..00000000
--- a/manifests/charts/admin/README.md.gotmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-## Apache Admin for Kubernetes
-
-Admin is an application within the service governance control plane
-responsible for functions such as service governance and visual representation 
of microservice clusters.
-
-
diff --git 
a/manifests/charts/admin/files/dashboards/dubbo-resources-traces.yaml 
b/manifests/charts/admin/files/dashboards/dubbo-resources-traces.yaml
new file mode 100644
index 00000000..a1c4ac80
--- /dev/null
+++ b/manifests/charts/admin/files/dashboards/dubbo-resources-traces.yaml
@@ -0,0 +1,74 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion 
.Values.kubeTargetVersionOverride }}
+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) 
(semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" 
$kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+  name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) 
"dubbo-app-metrics" | trunc 63 | trimSuffix "-" }}
+  annotations:
+{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
+  labels:
+    {{- if $.Values.grafana.sidecar.dashboards.label }}
+    {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary 
$.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty 
$.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
+    {{- end }}
+    app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+  dubbo-app-metrics.json: |-
+    
{{`{"annotations":{"list":[{"builtIn":1,"datasource":{"type":"grafana","uid":"--
 Grafana --"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 
1)","name":"Annotations & 
Alerts","type":"dashboard"}]},"editable":true,"fiscalYearStartMonth":0,"graphTooltip":0,"id":5,"links":[],"liveNow":false,"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":14,"panels":[],"title":"应用概览","type":"row"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"
 [...]
+  {{- end }}
+---
+{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion 
.Values.kubeTargetVersionOverride }}
+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) 
(semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" 
$kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+  name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) 
"dubbo-ins-metrics" | trunc 63 | trimSuffix "-" }}
+  annotations:
+{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
+  labels:
+    {{- if $.Values.grafana.sidecar.dashboards.label }}
+    {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary 
$.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty 
$.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
+    {{- end }}
+    app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+  dubbo-ins-metrics.json: |-
+    
{{`{"annotations":{"list":[{"builtIn":1,"datasource":{"type":"grafana","uid":"--
 Grafana --"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 
1)","name":"Annotations & 
Alerts","type":"dashboard"}]},"editable":true,"fiscalYearStartMonth":0,"graphTooltip":0,"id":6,"links":[],"liveNow":false,"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"panels":[],"title":"实例概览","type":"row"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"d
 [...]
+  {{- end }}
+---
+{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion 
.Values.kubeTargetVersionOverride }}
+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) 
(semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" 
$kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+  name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) 
"dubbo-svc-metrics" | trunc 63 | trimSuffix "-" }}
+  annotations:
+{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
+  labels:
+    {{- if $.Values.grafana.sidecar.dashboards.label }}
+    {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary 
$.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty 
$.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
+    {{- end }}
+    app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+  dubbo-svc-metrics.json: |-
+    
{{`{"annotations":{"list":[{"builtIn":1,"datasource":{"type":"grafana","uid":"--
 Grafana --"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 
1)","name":"Annotations & 
Alerts","type":"dashboard"}]},"editable":true,"fiscalYearStartMonth":0,"graphTooltip":0,"id":7,"links":[],"liveNow":false,"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":5,"panels":[],"title":"接口总览","type":"row"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"d
 [...]
+  {{- end }}
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/admin/certificates.yaml 
b/manifests/charts/admin/templates/dashboard/certificates.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/certificates.yaml
rename to manifests/charts/admin/templates/dashboard/certificates.yaml
diff --git a/manifests/charts/admin/templates/admin/configmap.yaml 
b/manifests/charts/admin/templates/dashboard/configmap.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/configmap.yaml
rename to manifests/charts/admin/templates/dashboard/configmap.yaml
diff --git a/manifests/charts/admin/templates/admin/deployment.yaml 
b/manifests/charts/admin/templates/dashboard/deployment.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/deployment.yaml
rename to manifests/charts/admin/templates/dashboard/deployment.yaml
diff --git a/manifests/charts/admin/templates/admin/networkpolicy.yaml 
b/manifests/charts/admin/templates/dashboard/networkpolicy.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/networkpolicy.yaml
rename to manifests/charts/admin/templates/dashboard/networkpolicy.yaml
diff --git a/manifests/charts/admin/templates/admin/persistentvolumeclaim.yaml 
b/manifests/charts/admin/templates/dashboard/persistentvolumeclaim.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/persistentvolumeclaim.yaml
rename to manifests/charts/admin/templates/dashboard/persistentvolumeclaim.yaml
diff --git a/manifests/charts/admin/templates/admin/poddisruptionbudget.yaml 
b/manifests/charts/admin/templates/dashboard/poddisruptionbudget.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/poddisruptionbudget.yaml
rename to manifests/charts/admin/templates/dashboard/poddisruptionbudget.yaml
diff --git a/manifests/charts/admin/templates/admin/podsecuritypolicy.yaml 
b/manifests/charts/admin/templates/dashboard/podsecuritypolicy.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/podsecuritypolicy.yaml
rename to manifests/charts/admin/templates/dashboard/podsecuritypolicy.yaml
diff --git a/manifests/charts/admin/templates/admin/rbac.yaml 
b/manifests/charts/admin/templates/dashboard/rbac.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/rbac.yaml
rename to manifests/charts/admin/templates/dashboard/rbac.yaml
diff --git a/manifests/charts/admin/templates/admin/service.yaml 
b/manifests/charts/admin/templates/dashboard/service.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/service.yaml
rename to manifests/charts/admin/templates/dashboard/service.yaml
diff --git a/manifests/charts/admin/templates/admin/statefulset.yaml 
b/manifests/charts/admin/templates/dashboard/statefulset.yaml
similarity index 100%
rename from manifests/charts/admin/templates/admin/statefulset.yaml
rename to manifests/charts/admin/templates/dashboard/statefulset.yaml
diff --git a/manifests/charts/admin/templates/exposer/deployment.yaml 
b/manifests/charts/admin/templates/exposer/deployment.yaml
deleted file mode 100644
index 9c679a7c..00000000
--- a/manifests/charts/admin/templates/exposer/deployment.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
-{{- $ingress := .Values.ingress -}}
-{{- if $ingress.enabled }}
-apiVersion: {{ template "apiVersion" . }}
-kind: Deployment
-metadata:
-  name: {{ template "traefik.name" . }}
-  namespace: {{ template "ingress.namespace" . }}
-spec:
-  replicas: {{ .Values.ingress.replicas }}
-  selector:
-    matchLabels:
-    {{- include "traefik.labels" . | nindent 6 }}
-  strategy:
-  {{- toYaml $ingress.strategy | nindent 4 }}
-  template:
-    metadata:
-      labels:
-      {{- include "traefik.labels" . | nindent 8 }}
-      annotations:
-      {{- include "traefik.annotations" . | nindent 8 }}
-    spec:
-      serviceAccountName: {{ template "traefik.name" }}
-      containers:
-      - name: traefik
-        image: {{ $ingress.image.registry }}:{{ $ingress.image.tag }}
-        imagePullPolicy: {{ $ingress.image.pullPolicy }}
-        resources:
-        {{- toYaml $ingress.resources | nindent 10 }}
-        readinessProbe:
-        {{- toYaml $ingress.readinessProbe | nindent 10 }}
-        livenessProbe:
-        {{- toYaml $ingress.livenessProbe | nindent 10 }}
-        ports:
-        - name: metrics
-          containerPort: {{ template "traefik.metrics.containerPort" . }}
-          hostPort: {{ template "traefik.metrics.hostPort" . }}
-          protocol: TCP
-        - name: traefik
-          containerPort: {{ template "traefik.traefik.containerPort" . }}
-          protocol: TCP
-        - name: web
-          containerPort: {{ template "traefik.web.containerPort" . }}
-          hostPort: {{ template "traefik.web.hostPort" . }}
-          protocol: TCP
-        - name: websecure
-          containerPort: {{ template "traefik.websecure.containerPort" . }}
-          hostPort: {{ template "traefik.websecure.hostPort" . }}
-          protocol: TCP
-        securityContext:
-        {{- toYaml $ingress.containersecurityContext | nindent 10 }}
-        volumeMounts:
-        - name: data
-          mountPath: /data
-        - name: tmp
-          mountPath: /tmp
-        args:
-        - "--global.checknewversion"
-        - "--global.sendanonymoususage"
-        - "--entrypoints.metrics.address=:9100/tcp"
-        - "--entrypoints.traefik.address=:9000/tcp"
-        - "--entrypoints.web.address=:8000/tcp"
-        - "--entrypoints.websecure.address=:8443/tcp"
-        - "--api.dashboard=true"
-        - "--ping=true"
-        - "--metrics.prometheus=true"
-        - "--metrics.prometheus.entrypoint=metrics"
-        - "--providers.kubernetescrd"
-        - "--providers.kubernetescrd.allowCrossNamespace=true"
-        - "--providers.kubernetescrd.allowExternalNameServices=true"
-        - "--providers.kubernetesingress"
-        - "--providers.kubernetesingress.allowExternalNameServices=true"
-        - "--entrypoints.websecure.http.tls=true"
-        - "--log.level=DEBUG"
-        - "--accesslog=true"
-        - "--accesslog.fields.defaultmode=keep"
-        - "--accesslog.fields.headers.defaultmode=drop"
-      volumes:
-      - name: data
-        emptyDir: {}
-      - name: tmp
-        emptyDir: {}
-      nodeSelector:
-      {{- toYaml $ingress.nodeSelector | nindent 8 }}
-      securityContext:
-      {{- toYaml $ingress.securityContext | nindent 8 }}
-{{- end -}}
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/exposer/ingress-class.yaml 
b/manifests/charts/admin/templates/exposer/ingress-class.yaml
deleted file mode 100644
index e43d8667..00000000
--- a/manifests/charts/admin/templates/exposer/ingress-class.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-{{- $ingress := .Values.ingress -}}
-{{- if $ingress.enabled }}
-apiVersion: {{ template "network.apiVersion" . }}
-kind: IngressClass
-metadata:
-  name: {{ template "traefik.name" . }}
-  annotations:
-    ingressclass.kubernetes.io/is-default-class: "false"
-spec:
-  controller: traefik.io/ingress-controller
-{{- end -}}
diff --git a/manifests/charts/admin/templates/exposer/ingress.yaml 
b/manifests/charts/admin/templates/exposer/ingress.yaml
deleted file mode 100644
index 0738c560..00000000
--- a/manifests/charts/admin/templates/exposer/ingress.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
-{{- $ingress := .Values.ingress -}}
-{{- if $ingress.enabled }}
-apiVersion: {{ template "network.apiVersion" . }}
-kind: Ingress
-metadata:
-  name: {{ template "admin.name" . }}-ingress
-  namespace: {{ template "system.namespaces" . }}
-spec:
-  ingressClassName: {{ template "traefik.name" . }}
-  rules:
-  - host: {{ $ingress.hosts.admin }}
-    http:
-      paths:
-      - path: /
-        pathType: Prefix
-        backend:
-          service:
-            name: {{ template "admin.name" . }}
-            port:
-              number: {{ template "admin.port" . }}
----
-apiVersion: {{ template "network.apiVersion" . }}
-kind: Ingress
-metadata:
-  name: {{ template "prom.name" . }}-ingress
-  namespace: {{ template "system.namespaces" . }}
-spec:
-  ingressClassName: {{ template "traefik.name" . }}
-  rules:
-  - host: {{ $ingress.hosts.prometheus }}
-    http:
-      paths:
-      - path: /
-        pathType: Prefix
-        backend:
-          service:
-            name: {{ template "prom.name" . }}
-            port:
-              number: {{ template "prom.port" . }}
----
-apiVersion: {{ template "network.apiVersion" . }}
-kind: Ingress
-metadata:
-  name: {{ template "grafana.name" . }}-ingress
-  namespace: {{ template "system.namespaces" . }}
-spec:
-  ingressClassName: {{ template "traefik.name" . }}
-  rules:
-  - host: {{ $ingress.hosts.grafana }}
-    http:
-      paths:
-      - path: /
-        pathType: Prefix
-        backend:
-          service:
-            name: {{ template "grafana.name" . }}
-            port:
-              number: {{ template "grafana.port" . }}
-  {{- end -}}
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/exposer/rbac.yaml 
b/manifests/charts/admin/templates/exposer/rbac.yaml
deleted file mode 100644
index 9d2a0db3..00000000
--- a/manifests/charts/admin/templates/exposer/rbac.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
-{{- $ingress := .Values.ingress -}}
-{{- $rbac := .Values.rbac -}}
-{{- if $ingress.enabled }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ template "traefik.name" . }}
-  namespace: {{ template "ingress.namespace" . }}
----
-apiVersion: {{ include "rbac.apiVersion" . }}
-kind: ClusterRole
-metadata:
-  name: {{ include "traefik.name" . }}-clusterrole
-rules:
-- apiGroups:
-  - extensions
-  - networking.k8s.io
-  resources:
-  - ingressclasses
-  - ingresses
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - services
-  - endpoints
-  - secrets
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - extensions
-  - networking.k8s.io
-  resources:
-  - ingresses/status
-  verbs:
-  - update
-- apiGroups:
-  - traefik.io
-  - traefik.containo.us
-  resources:
-  - ingressroutes
-  - ingressroutetcps
-  - ingressrouteudps
-  - middlewares
-  - middlewaretcps
-  - tlsoptions
-  - tlsstores
-  - traefikservices
-  - serverstransports
-  verbs:
-  - get
-  - list
-  - watch
----
-apiVersion: {{ include "rbac.apiVersion" . }}
-kind: ClusterRoleBinding
-metadata:
-  name: {{ include "traefik.name" . }}-clusterrolebinding
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: {{ include "traefik.name" . }}-clusterrole
-subjects:
-- kind: ServiceAccount
-  name: {{ template "traefik.name" . }}
-  namespace: {{ template "ingress.namespace" . }}
-  {{- end -}}
\ No newline at end of file
diff --git a/manifests/charts/admin/values.schema.json 
b/manifests/charts/admin/values.schema.json
deleted file mode 100644
index b1d05a16..00000000
--- a/manifests/charts/admin/values.schema.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-07/schema#";,
-  "type": "object",
-  "properties": {
-    "traffic": {
-      "type": "object",
-      "properties": {
-        "enabled": {
-          "type": "boolean",
-          "default": false
-        }
-      }
-    }
-  }
-}

Reply via email to