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
Increase or Decrease polling rate for instance in a final state ready or failed. (#53)
* Initial commit for decrease polling interval for instances in a final state
* Add reconciler helpers
* Refactoring helper function, and adding unit tests
* add second annotation for fail
* Update official documentation. Adding a new page called, Annotations.
* Add license header missed in new Go files. React to reviewer comment about the service binding controller.
* React to reviewer comment in PR. Removing old comments.
* Update website/content/en/docs/tutorials/annotations.md
Co-authored-by: RalfHammer <[email protected]>
* Update reconciler_helpers.go
* Change annotations.md following a reviewer comment.
---------
Co-authored-by: shilparamasamyreddy <[email protected]>
Co-authored-by: RalfHammer <[email protected]>
// IncrementRetryCounterAndCheckRetryLimit increments the retry counter for a ServiceInstance and checks if the number of retries has exceeded the maximum allowed retries.
448
-
// The maximum retries is configured per ServiceInstance via the annotation, AnnotationMaxRetries. If not specified,
449
-
// a default value is used.
450
-
// This function updates the ServiceInstance's Condition and State to indicate a failure when the retry limit is reached.
451
-
// Returns:A boolean indicating whether the retry limit has been reached.
log.V(1).Info("Invalid max retries annotation value, using default", "AnnotationMaxRetries", maxRetriesStr)
462
-
} else {
463
-
serviceInstance.Status.MaxRetries=maxRetries
464
-
}
465
-
}
466
-
}
467
-
468
-
// function to read/get reconcile timeout annotation from the service instance "AnnotationReconcileTimeout = "service-operator.cf.cs.sap.com/timeout-on-reconcile" "
469
-
// if the annotation is not set, the default value is used serviceInstanceDefaultRequeueTimeout
470
-
// else returns the reconcile timeout as a time duration
How to control and optimize the CF Service Operator behavior via annotations.
8
+
---
9
+
10
+
## Annotation Polling Interval Ready
11
+
12
+
The AnnotationPollingIntervalReady annotation is used to specify the duration of the requeue after interval at which the operator polls the status of a Custom Resource after final state ready. It is possible to apply this annotations to Space, ServiceInstance and ServiceBiding CRs.
13
+
14
+
By using this annotation, the code allows for flexible configuration of the polling interval, making it easier to adjust the readiness checking frequency based on specific requirements or conditions.
15
+
16
+
The value of the annotation is a string representing a duration, such as "100m" or "5h".
In the example above the custom resource will be reconcile every three hours after reaching the state Ready.
29
+
30
+
**Default Requeue After Interval**
31
+
32
+
If the annotation AnnotationPollingIntervalReady is not set, the interval duration will be set to 10 minutes by default.
33
+
34
+
### Annotation Polling Interval Fail
35
+
36
+
The AnnotationPollingIntervalFail annotation is used to specify the duration of the requeue interval at which the operator polls the status of a Custom Resource after the final states Creation Failed and Deletion Failed. Currently it is possible to apply this annotations to ServiceInstance custom resource only.
37
+
38
+
By using this annotation, the code allows for flexible configuration of the polling interval, making it easier to adjust the re-queue frequency after the failure based on specific requirements or conditions.
39
+
40
+
The value of the annotation is a string representing a duration, such as "20s" or "10m".
In the example above the custom resource will be reconcile every five minutes after reaching the final state Failed.
53
+
54
+
**Default Requeue After Interval**
55
+
56
+
If the annotation AnnotationPollingIntervalFail is not set, there won't be an immediate requeue. This means the resource will not be re-reconciled right away. The operator will consider the custom resource to be in a stable state, at least for now.
57
+
58
+
That means there is no default time duration for it, and it will return an empty result, ctrl.Result{}.
0 commit comments