Folders
Folders are great way to group your Dashboards and a requirement to for AlertRuleGroups.
Resources like GrafanaDashboards and GrafanaAlertRuleGroups can reference folders using .spec.folderUID.
Which is useful when folders are managed through other means than the operator.
But creating a GrafanaFolder allows other CRs to use .spec.folderRef which enables named references.
To view all configuration options for Folders, look at our API documentation.
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaFolder
metadata:
  name: test-folder
spec:
  instanceSelector:
    matchLabels:
      dashboards: "grafana"
  # If title is not defined, the value will be taken from metadata.name
  title: custom title
Note
The folder reconciler attempts to take control over existing folders if a folder with the same name already exists and.spec.uid is empty/absent.
This can lead to unpredictable behavior and will be removed in future versions.
Please take care to make sure any managed folders are created by the operator.