You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/en/docs/patterns-and-best-practices/_index.md
+12
Original file line number
Diff line number
Diff line change
@@ -120,3 +120,15 @@ might be a permission issue for some resources in another namespace.
120
120
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)
121
121
behavior. If true operator will stop on cache sync timeout. if `false`, after the timeout the controller will start
122
122
reconcile resources even if one or more event source caches did not sync yet.
123
+
124
+
## Graceful Shutdown
125
+
126
+
You can provide sufficient time for the reconciler to process and complete the currently ongoing events before shutting down.
127
+
The configuration is simple. You just need to set an appropriate duration value for `reconciliationTerminationTimeout` using `ConfigurationServiceOverrider`.
Copy file name to clipboardExpand all lines: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java
+13
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ public class ConfigurationServiceOverrider {
Copy file name to clipboardExpand all lines: operator-framework-core/src/test/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverriderTest.java
+4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
packageio.javaoperatorsdk.operator.api.config;
2
2
3
+
importjava.time.Duration;
3
4
importjava.util.Optional;
4
5
importjava.util.concurrent.Executors;
5
6
@@ -63,6 +64,7 @@ public <R extends HasMetadata> R clone(R object) {
0 commit comments