Skip to content

Commit

Permalink
Merge pull request #156 from qonto/disable-dashboards
Browse files Browse the repository at this point in the history
Disable automatic dashboard deployment
  • Loading branch information
vmercierfr authored Mar 29, 2024
2 parents 89cd9ab + 7f14016 commit ed80d43
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ It collects key metrics about:
## Dashboards

> [!TIP]
> Grafana dashboards are deployed by default as [GrafanaDashboard CRD](https://grafana.github.io/grafana-operator/docs/dashboards/) when Prometheus RDS exporter is deployed with Helm. If you deployed [Grafana operator](https://grafana.github.io/grafana-operator/) in your Kubernetes cluster, dashboards will be automatically imported and **maintained up-to-date**.
> If you deploy [Grafana operator](https://grafana.github.io/grafana-operator/) in your Kubernetes cluster, dashboards could be automatically deployed and **maintained up-to-date**.
> Set `dashboards.enabled: true` in your Helm deployment to deploy dashboards as [GrafanaDashboard CRD](https://grafana.github.io/grafana-operator/docs/dashboards/)
<details>
<summary>Why are we recommending Grafana operator?</summary>
Expand Down
14 changes: 7 additions & 7 deletions configs/helm/tests/grafanadashboard_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ suite: grafana dashboard tests
templates:
- grafanadashboard.yaml
tests:
- it: disable Grafana dashboards by default
asserts:
- hasDocuments:
count: 0
- it: render default Grafana dashboards
values:
- ./values/with_grafanadashboards.yaml
asserts:
- isKind:
of: GrafanaDashboard
Expand Down Expand Up @@ -33,7 +39,7 @@ tests:
value: grafana
- it: render custom Grafana dashboards settings
values:
- ./values/with_grafanadashboards.yaml
- ./values/with_grafanadashboards_custom.yaml
asserts:
- equal:
path: spec.resyncPeriod
Expand All @@ -44,9 +50,3 @@ tests:
- equal:
path: spec.instanceSelector.matchLabels.dashboards
value: my-grafana
- it: disable Grafana dashboards
values:
- ./values/without_grafanadashboards.yaml
asserts:
- hasDocuments:
count: 0
4 changes: 1 addition & 3 deletions configs/helm/tests/values/with_grafanadashboards.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
dashboards:
resyncPeriod: 1m
instanceSelector: my-grafana
folderName: dmf
enabled: true
6 changes: 6 additions & 0 deletions configs/helm/tests/values/with_grafanadashboards_custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
dashboards:
enabled: true
resyncPeriod: 1m
instanceSelector: my-grafana
folderName: dmf
3 changes: 0 additions & 3 deletions configs/helm/tests/values/without_grafanadashboards.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion configs/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ tolerations: []
affinity: {}

dashboards:
enabled: true # enabled GrafanaDashboard CRD import
enabled: false # enabled GrafanaDashboard CRD import
resyncPeriod: 24h # how often the dashboard is refreshed
instanceSelector: grafana # selects Grafana for import
folderName: # folder assignment for dashboard

0 comments on commit ed80d43

Please sign in to comment.