Closed Brandon-Kimberly closed 1 month ago
Can someone please help me understand this? The documentation suggests that this is all I should need to do to disable the syncing mechanism but it does not appear to be working as advertised.
The resync period needs to be set on the resource (GrafanaDashboard
,GrafanaFolder
,GrafanaAlertRuleGroup
, etc) and not in the helm values.
Setting the resync interval to 0
will prevent the operator from periodically resyncing on its own, but it will still sync the resource in two cases:
Can you further elaborate on your use case of "initial sync only" dashboards?
Thanks for the response! I would like for the Grafana Operator to make a single call to the Grafana API to create the dashboard. After the dashboard has been initially created, I don't want the operator to continue to sync. How can I achieve this?
I am using Flux to sync the dashboard definitions if that could account for this resyncing as the resource may technically be "updated" from time to time.
We discussed this in our weekly sync call and don't think this is a behavior we want to encourage.
The intended use case of setting resyncPeriod: 0m
is to still apply changes when the resource changes. For an operator, there is no way to detect if the reconciliation happened due to a restart or resource change.
We'll update the documentation to communicate this more clearly.
For your usecase, you could take a look at grizzly or the grafana terraform provider to accomplish the pattern of initial sync only
Describe the bug I've installed the Grafana Operator helm chart to my Kubernetes cluster supplying the value for
resyncPeriod
as0m
. According to the documentation here this should disable the syncing functionality entirely:Version v5.6.0
To Reproduce Steps to reproduce the behavior:
Install Grafana Operator helm chart v5.6.0 and supply the value
resyncPeriod: 0m
.Expected behavior I expect that the dashboards are created once and never synced again. However, I can see when I get the grafanadashboards in my Kubernetes cluster that they are continuing to sync. See (notice Last Resync is far sooner than the age, and has only stopped due to the API key no longer being active):
Suspect component/Location where the bug might be occurring Unknown
Runtime (please complete the following information):
Additional context Here is the full Helm chart (you can see
resyncPeriod: 0m
inUSER-SUPPLIED VALUES
and inCOMPUTED VALUES
: