Skip to content

Commit

Permalink
chore: move dashboards to the corresponding cd helm charts (#4306)
Browse files Browse the repository at this point in the history
(cherry picked from commit f9e9293)
  • Loading branch information
runsun committed Jul 17, 2023
1 parent 3466fd0 commit a28a05d
Show file tree
Hide file tree
Showing 18 changed files with 152 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/apecloud-mysql/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "apecloud-mysql.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "apecloud-mysql.name" $ }}-grafana
{{ include "apecloud-mysql.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/kafka/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "kafka.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "kafka.name" $ }}-grafana
{{ include "kafka.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/mongodb/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "mongodb.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "mongodb.name" $ }}-grafana
{{ include "mongodb.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/postgresql/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "postgresql.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "postgresql.name" $ }}-grafana
{{ include "postgresql.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/qdrant/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "qdrant.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "qdrant.name" $ }}-grafana
{{ include "qdrant.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/redis/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "redis.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "redis.name" $ }}-grafana
{{ include "redis.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/tdengine/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "tdengine.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "tdengine.name" $ }}-grafana
{{ include "tdengine.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}
File renamed without changes.
19 changes: 19 additions & 0 deletions deploy/weaviate/templates/grafana/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-grafana-%s" (include "weaviate.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
labels:
grafana_dashboard: "1"
app: {{ template "weaviate.name" $ }}-grafana
{{ include "weaviate.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}

0 comments on commit a28a05d

Please sign in to comment.