Skip to content

Commit adddfb9

Browse files
committed
docs(resyncPeriod): Expand section and mention --default-resync-period
1 parent 4f7a236 commit adddfb9

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

examples/common_options/_index.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,26 @@ weight: 20
88
Grafana doesn't have any webhooks or similar ways of notifying the operator that a Grafana resource, like a dashboard, has changed.
99
Due to this the Grafana operator constantly polls the Grafana API to test for changes and overwrite the resources, reconciling towards the desired state.
1010

11-
We describe this loop as a synchronizing resources with Grafana instances.
11+
We describe this loop as reconciling the manifest(Custom Resource/CR) and synchronizing with Grafana instances.
1212

1313
To control how often this polling should occur, you can set the `spec.resyncPeriod` field.
14-
This field tells the operator how often it should poll the Grafana instance for changes for the specific resource.
14+
This tells the operator how often it should reconcile and synchronize the CR.
1515

16-
If a dashboard has changed, the operator will overwrite and synchronize the dashboard after `10m` by default.
16+
By default, the operator will reconcile with an interval of `10m`.
17+
The default is configurable through the `--default-resync-period=10m` cli option and applies when `.spec.resyncPeriod` is omitted.
1718

18-
This can of course be annoying for developers actively updating a resource. The recommended workflow is to duplicate the dashboard/alert/other and work on the copy.
19-
When finished, export the changes and update the resource manifest to update the original.
19+
The `resyncPeriod` is applied on **successful** synchronizations.
2020

21-
This can be disabled by setting a the value to `0m`
21+
When an error is encountered during a synchronization, like a request timeout, the operator repeatedly retries the full synchronization with an exponential backoff.
22+
23+
The first retry is immediate, the second retry is delayed by a second and so on.
24+
25+
#### Disable Resync
26+
27+
Periodic synchronization can of course be annoying for developers actively working in Grafana. The recommended workflow is to duplicate the dashboard/alert/other and work on the copy.
28+
When finished, export the changes and update the manifest and let the operator synchronize the original.
29+
30+
Alternatively, resync can be disabled by setting `.spec.resyncPeriod=0m` or by suspending reconciliation entirely with `.spec.suspend=true`(Read more below)
2231

2332
```yaml
2433
apiVersion: grafana.integreatly.org/v1beta1
@@ -33,12 +42,6 @@ spec:
3342
url: "https://grafana.com/api/dashboards/7651/revisions/44/download"
3443
```
3544
36-
The `resyncPeriod` is applied on successful synchronizations.
37-
38-
When an error is encountered during a synchronization, like a request timeout, the operator repeatedly retries the full synchronization with an exponential backoff.
39-
40-
The first retry is immediate, the second retry is delayed by a second and so on.
41-
4245
{{% alert title="Warning" color="warning" %}}
4346
Even after setting `resyncPeriod` to `0m`, the operator will still sync the resource whenever it changes or the operator is restarted
4447
{{% /alert %}}

0 commit comments

Comments
 (0)