diff --git a/README.md b/README.md index aebd198..8a1d505 100644 --- a/README.md +++ b/README.md @@ -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/)
Why are we recommending Grafana operator? diff --git a/configs/helm/tests/grafanadashboard_test.yaml b/configs/helm/tests/grafanadashboard_test.yaml index f8fb2d6..e5aa496 100644 --- a/configs/helm/tests/grafanadashboard_test.yaml +++ b/configs/helm/tests/grafanadashboard_test.yaml @@ -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 @@ -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 @@ -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 diff --git a/configs/helm/tests/values/with_grafanadashboards.yaml b/configs/helm/tests/values/with_grafanadashboards.yaml index 82895be..2d16281 100644 --- a/configs/helm/tests/values/with_grafanadashboards.yaml +++ b/configs/helm/tests/values/with_grafanadashboards.yaml @@ -1,5 +1,3 @@ --- dashboards: - resyncPeriod: 1m - instanceSelector: my-grafana - folderName: dmf + enabled: true diff --git a/configs/helm/tests/values/with_grafanadashboards_custom.yaml b/configs/helm/tests/values/with_grafanadashboards_custom.yaml new file mode 100644 index 0000000..8c2b374 --- /dev/null +++ b/configs/helm/tests/values/with_grafanadashboards_custom.yaml @@ -0,0 +1,6 @@ +--- +dashboards: + enabled: true + resyncPeriod: 1m + instanceSelector: my-grafana + folderName: dmf diff --git a/configs/helm/tests/values/without_grafanadashboards.yaml b/configs/helm/tests/values/without_grafanadashboards.yaml deleted file mode 100644 index 4306715..0000000 --- a/configs/helm/tests/values/without_grafanadashboards.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dashboards: - enabled: false diff --git a/configs/helm/values.yaml b/configs/helm/values.yaml index cc6c565..a6820d6 100644 --- a/configs/helm/values.yaml +++ b/configs/helm/values.yaml @@ -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