From e9f84fd688f7090c5182c01a225906a9e8510871 Mon Sep 17 00:00:00 2001 From: Phil Brookes Date: Wed, 15 Jan 2025 11:42:53 +0100 Subject: [PATCH] add DNS Operator to grafana.com, example.md and kustomize.yaml Signed-off-by: Phil Brookes --- .../grafana/grafana_deployment_patch.yaml | 12 +++++++ .../openshift/grafana/dashboards.yaml | 12 +++++++ doc/observability/examples.md | 1 + .../{dns-operator.yaml => dns-operator.json} | 34 +++++++++++++++++-- examples/dashboards/kustomization.yaml | 3 ++ 5 files changed, 59 insertions(+), 3 deletions(-) rename examples/dashboards/{dns-operator.yaml => dns-operator.json} (96%) diff --git a/config/observability/grafana/grafana_deployment_patch.yaml b/config/observability/grafana/grafana_deployment_patch.yaml index 771133bf2..39590ec3f 100644 --- a/config/observability/grafana/grafana_deployment_patch.yaml +++ b/config/observability/grafana/grafana_deployment_patch.yaml @@ -33,6 +33,13 @@ configMap: defaultMode: 420 name: grafana-controller-runtime-metrics +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-dns-operator + configMap: + defaultMode: 420 + name: grafana-dns-operator - op: add path: /spec/template/spec/containers/0/volumeMounts/- value: @@ -58,3 +65,8 @@ value: name: grafana-controller-resources-metrics mountPath: /grafana-dashboard-definitions/0/grafana-controller-resources-metrics +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-dns-operator + mountPath: /grafana-dashboard-definitions/0/grafana-dns-operator diff --git a/config/observability/openshift/grafana/dashboards.yaml b/config/observability/openshift/grafana/dashboards.yaml index 10601e383..7476e535e 100644 --- a/config/observability/openshift/grafana/dashboards.yaml +++ b/config/observability/openshift/grafana/dashboards.yaml @@ -57,3 +57,15 @@ spec: configMapRef: name: grafana-app-developer key: app_developer.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: grafana-dns-operator +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + configMapRef: + name: grafana-dns-operator + key: dns-operator.json diff --git a/doc/observability/examples.md b/doc/observability/examples.md index 42039c3ab..e4eb23bf4 100644 --- a/doc/observability/examples.md +++ b/doc/observability/examples.md @@ -9,6 +9,7 @@ There are some example dashboards uploaded to [Grafana.com](https://grafana.com/ | [App Developer Dashboard](https://grafana.com/grafana/dashboards/21538) | `21538` | | [Business User Dashboard](https://grafana.com/grafana/dashboards/20981) | `20981` | | [Platform Engineer Dashboard](https://grafana.com/grafana/dashboards/20982) | `20982` | +| [DNS Operator Dashboard](https://grafana.com/grafana/dashboards/22695) | `22695` | ## Dashboards diff --git a/examples/dashboards/dns-operator.yaml b/examples/dashboards/dns-operator.json similarity index 96% rename from examples/dashboards/dns-operator.yaml rename to examples/dashboards/dns-operator.json index 474cd1fa4..db365658d 100644 --- a/examples/dashboards/dns-operator.yaml +++ b/examples/dashboards/dns-operator.json @@ -1,4 +1,30 @@ { + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.5.3" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], "annotations": { "list": [ { @@ -18,7 +44,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 36, + "id": null, "links": [], "liveNow": false, "panels": [ @@ -559,7 +585,9 @@ "refresh": "30s", "schemaVersion": 38, "style": "dark", - "tags": [], + "tags": [ + "kuadrant" + ], "templating": { "list": [ { @@ -589,6 +617,6 @@ "timezone": "browser", "title": "DNS Operator overview", "uid": "f4f80fb8-6da0-4260-b534-2549cd25210fd", - "version": 4, + "version": 1, "weekStart": "monday" } diff --git a/examples/dashboards/kustomization.yaml b/examples/dashboards/kustomization.yaml index cd26abf16..91598748b 100644 --- a/examples/dashboards/kustomization.yaml +++ b/examples/dashboards/kustomization.yaml @@ -20,6 +20,9 @@ configMapGenerator: - name: grafana-controller-resources-metrics files: - ./controller-resources-metrics.json +- name: dns-operator + files: + - ./dns-operator.json generatorOptions: disableNameSuffixHash: true