Ansible Operator Watches
- group: The group of the Custom Resource that you will be watching.
- version: The version of the Custom Resource that you will be watching.
- kind: The kind of the Custom Resource that you will be watching.
- vars: This is an arbitrary map of key-value pairs. The contents will be passed as to the playbook or role specified for this watch.
- reconcilePeriod (optional): The maximum interval that the operator will wait before beginning another reconcile, even if no watched events are received. When an operator watches many resources, each reconcile can become expensive, and a low value here can actually reduce performance. Typically, this option should only be used in advanced use cases where
watchDependentResources
is set toFalse
and when is not possible to use the watch feature. E.g To manage external resources that don’t emit Kubernetes events. The format for the duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as “300ms”, “1.5h” or “2h45m”. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”. - manageStatus (optional): When true (default), the operator will manage the status of the CR generically. Set to false, the status of the CR is managed elsewhere, by the specified role/playbook or in a separate controller.
- blacklist: A list of child resources (by GVK) that will not be watched or cached.
An example Watches file:
Some features can be overridden per resource via an annotation on that CR. The options that are overridable will have the annotation specified below.
Example
Example: