Skip to content

Commit 4b21c47

Browse files
Close #5837: Document reconcile period for ansible in advanced options (#5848)
Signed-off-by: Venkat Ramaraju <[email protected]>
1 parent 5257910 commit 4b21c47

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

website/content/en/docs/building-operators/ansible/reference/advanced_options.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,30 @@ Using the `--ansible-log-events` CLI flag, you can determine to what degree the
263263
2. `Tasks` - Only Ansible Tasks will be outputted.
264264
3. `Everything` - All info logs and all tasks will be outputted.
265265
266-
If you want more control over the logs that are outputted, consider using the [Zap Logger][Zap-Logger] and [verbosity annotations][verbosity-annotations] in tandem with the `--ansible-log-events` CLI flag.
266+
If you want more control over the logs that are outputted, consider using the [Zap Logger][Zap-Logger] and [verbosity annotations][verbosity-annotations] in tandem with the `--ansible-log-events` CLI flag.
267+
268+
## `ansible.sdk.operatorframework.io/reconcile-period` Custom Resource Annotation
269+
270+
You can specify the reconcile period for an Ansible Operator by adding the ansible.sdk.operatorframework.io/reconcile-period key to the custom resource annotations.
271+
This feature specifies the maximum interval in which a cluster will get reconciled. If changes are detected in the desired state, the cluster may be reconciled sooner than the specified interval.
272+
273+
The reconcile period can be specified in the custom resource's annotations in the following manner:
274+
275+
```yaml
276+
...
277+
metadata:
278+
name: memcached-sample
279+
annotations:
280+
ansible.sdk.operatorframework.io/reconcile-period: 5s
281+
...
282+
```
283+
284+
The key only accepts a value in the `h/m/s` format, such as `1h2m4s`, `3m0s`, or `4s`. Values such as `1x3m9s` are invalid.
285+
286+
**NOTE**: Alternatively, you can specify the reconcile period for Ansible-based Operators in the following ways:
287+
- Using the `--reconcile-period` command-line flag
288+
- Using the 'reconcilePeriod' key in the `watches.yaml` file
289+
You should not use all three methods to specify a single reconcile period. If all three methods are used simultaneously, the order of precedence is as follows: Custom resource annotations > `watches.yaml` file > command-line flag.
267290

268291

269292
[ansible-vault-doc]: https://docs.ansible.com/ansible/latest/user_guide/vault.html

0 commit comments

Comments
 (0)