Skip to content

Commit

Permalink
Update: monitoring mixins set to v1.12.0 for coredns-mixin (#932)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <[email protected]>
Co-authored-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
github-actions[bot] and nlamirault authored Nov 23, 2024
1 parent 55e317b commit 5d8801a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/coredns-mixin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ keywords:
- prometheus
- monitoring-mixin
- portefaix
version: 1.4.1
version: 1.5.0
appVersion: master

maintainers:
Expand All @@ -53,4 +53,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: clean dashboards
description: coredns-mixin vmaster
2 changes: 1 addition & 1 deletion charts/coredns-mixin/dashboards/coredns.json
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@
"style": "dark",
"tags": [
"coredns-mixin",
"monitoring-mixins-v1.6.0"
"monitoring-mixins-v1.12.0"
],
"templating": {
"list": [
Expand Down
3 changes: 3 additions & 0 deletions charts/coredns-mixin/templates/alerts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.monitor.enabled -}}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
Expand All @@ -8,6 +9,7 @@ metadata:
{{- include "coredns-mixin.annotations" . | indent 4 }}
labels:
{{- include "coredns-mixin.labels" . | indent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.monitor.additionalLabels }}
{{- toYaml .Values.monitor.additionalLabels | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -115,3 +117,4 @@ spec:
for: 10m
labels:
severity: warning
{{- end }}
36 changes: 31 additions & 5 deletions charts/coredns-mixin/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
---
{{ if .Values.grafanaDashboard.enabled -}}
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
---
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" | lower }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "dashboard-coredns-mixin-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "coredns-mixin.namespace" $ }}
annotations:
grafana-folder: {{ $.Values.grafana.folder }}
grafana-folder: {{ $.Values.grafanaDashboard.folder }}
{{- include "coredns-mixin.annotations" $ | indent 6 }}
labels:
grafana-dashboard: {{ $dashboardName }}
{{- include "coredns-mixin.labels" $ | indent 6 }}
app.kubernetes.io/component: dashboard
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "coredns-mixin.namespace" $ }}
data:
{{ $dashboardName }}.json: |-
{{ $.Files.Get $path | indent 6}}
{{- end }}
{{ if $.Values.grafanaDashboard.grafanaOperator.enabled -}}
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
{{- include "coredns-mixin.labels" $ | indent 4 }}
app.kubernetes.io/component: dashboard
name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
namespace: {{ $.Release.Namespace }}
spec:
allowCrossNamespaceImport: {{ $.Values.grafanaDashboard.grafanaOperator.allowCrossNamespaceImport }}
folder: {{ $.Values.grafanaDashboard.folder }}
instanceSelector:
matchLabels:
{{- toYaml $.Values.grafanaDashboard.grafanaOperator.matchLabels | nindent 6 }}
configMapRef:
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
key: {{ $dashboardName }}.json
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 5d8801a

Please sign in to comment.