Skip to content

Document best practices for editing dashboards in grafrana while the operator is active #1597

@gberche-orange

Description

@gberche-orange

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When the operator is reconciling (version 5.8.1, packaged by bitnami helm chart 4.1.0), it is overriding changes made to dashboards using grafana ui.

(If applicable)If your feature request solves a bug please provide a link to the community issue

Describe the solution you'd like

A documented workflow on how to author dashboards using the UI while working with grafana operator

Here is the workflow what I'm currently using, but it is tedious and error prone

Initial version of a dashboard:

  datasources:
    - inputName: datasource
      datasourceName: DS_PROMETHEUS
  • update the expected state by operator (say configmap pulled from git repo)

2nd version of the dashboard edited through grafana (typically adding new panels or applying non trivial changes):

  • temporary disable the grafana operator kubectl scale --replicas=0 deployment grafana-operator
  • optionally make a copy of the dashboard to modify it (named dashboard-copy)
  • edit the dashboard-copy
  • export the dashboard-copy as json
  • edit the Json to:
    • restore original name
    • restore original dashboard gui
  • re-enable the grafana operator kubectl scale --replicas=1 deployment grafana-operator
  • update the expected state by operator (say configmap pulled from git repo)

2nd version of the dashboard with multiple predictable changes to promql expressions (i.e. no need for webui ):

  • edit the dashboard json in the gitops repo
  • commit & push
  • wait for grafana operator to apply changes
  • manually check in grafana the expected result

Describe alternatives you've considered

Checking dashboard CRD api for existing undocumented support for pausing the reconciliation during authoring of new dashboards (similar to flux suspend/resume)

The operator could also detects drifts (i.e. newer versions) and only issue a warning without overriding the dashboard. Potentially related to #1106

Additional context
Add any other context or screenshots about the feature request here.

Existing solutions
If applicable please provide a link to an existing solution from a different project

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions