Skip to content

docs: sync timeout docs improvement #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/documentation/patterns-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ advised to put such state into a separate resource meant for this purpose such a
Kubernetes Secret or ConfigMap or even a dedicated Custom Resource, which structure can be more
easily validated.

## Stopping (or not) Operator in case of Informer Errors
## Stopping (or not) Operator in case of Informer Errors and Cache Sync Timeouts

It can
be [configured](https://github.com/java-operator-sdk/java-operator-sdk/blob/2cb616c4c4fd0094ee6e3a0ef2a0ea82173372bf/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L168-L168)
Expand All @@ -120,4 +120,6 @@ that is when a resource cannot be deserialized. The typical use case for changin
is watched by a controller. In is better to start up the operator, so it can handle other namespaces while there
might be a permission issue for some resources in another namespace.


The `stopOnInformerErrorDuringStartup` has implication on [cache sync timeout](https://github.com/java-operator-sdk/java-operator-sdk/blob/114c4312c32b34688811df8dd7cea275878c9e73/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L177-L179)
behavior. If true operator will stop on cache sync timeout. if `false`, after the timeout the controller will start
reconcile resources even if one or more event source caches did not sync yet.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ default boolean stopOnInformerErrorDuringStartup() {
}

/**
* Timeout for cache sync in milliseconds. In other words source start timeout. Note that is
* Timeout for cache sync. In other words source start timeout. Note that is
* "stopOnInformerErrorDuringStartup" is true the operator will stop on timeout. Default is 2
* minutes.
*/
Expand Down