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/source/user_guide/configuration_options.rst
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -942,7 +942,46 @@ Work Kubernetes
942
942
work-kubernetes:
943
943
- worktype: cat
944
944
945
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
946
+
Kubernetes Environment Variables
947
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
945
948
949
+
The following environment variables can be used to configure Kubernetes worker behavior:
950
+
951
+
.. note::
952
+
The environment variable ``RECEPTOR_OPEN_LOGSTREAM_TIMEOUT`` has been replaced with ``RECEPTOR_KUBE_TIMEOUT_START``. The new variable controls the initial sleep duration for all Kubernetes API retry operations using Fibonacci backoff, not just log stream timeouts.
953
+
954
+
.. list-table:: Kubernetes Environment Variables
955
+
:header-rows: 1
956
+
:widths: auto
957
+
958
+
* - Variable
959
+
- Description
960
+
- Default value
961
+
- Valid range
962
+
- Type
963
+
* - ``RECEPTOR_KUBE_TIMEOUT_START``
964
+
- Initial timeout duration between Kubernetes API retry attempts. Valid time units: "ns", "ms", "s", "m", "h"
965
+
- 1s
966
+
- Any valid duration up to 1m
967
+
- string (duration)
968
+
* - ``RECEPTOR_KUBE_RETRY_COUNT``
969
+
- Number of retry attempts for Kubernetes API operations. Uses exponential backoff with Fibonacci-like sequence.
970
+
- 5
971
+
- 1-100
972
+
- int
973
+
974
+
**Important Notes:**
975
+
976
+
- **Fibonacci Backoff**: Retry delays increase by Fibonacci increments. For example, with ``RECEPTOR_KUBE_TIMEOUT_START=1s``, retry delays will be: 1s, 2s, 3s, 5s, 8s, etc.
977
+
- **Timeout Start Limit**: ``RECEPTOR_KUBE_TIMEOUT_START`` values exceeding 1 minute will be capped at the maximum of 1 minute.
978
+
- **Maximum Sleep Duration**: Individual sleep durations are capped at 5 minutes to prevent extremely long waits.
979
+
- **Performance Impact**: High retry counts can result in very long wait times. Consider the total time impact when setting these values.
kw.GetWorkceptor().nc.GetLogger().Warning("Invalid value for RECEPTOR_OPEN_LOGSTREAM_TIMEOUT: %s. Ignoring", envTimeout)
240
-
openLogStreamTimeout=1
240
+
kw.GetWorkceptor().nc.GetLogger().Warning("Invalid value for RECEPTOR_KUBE_TIMEOUT_START: %s. Ignoring", envTimeout)
241
+
kubeTimeoutStart=1*time.Second
241
242
}
243
+
// ignore if exceeds limit, use max
244
+
ifkubeTimeoutStart>time.Minute*1 {
245
+
kw.GetWorkceptor().nc.GetLogger().Warning("RECEPTOR_KUBE_TIMEOUT_START of: %d is larger than the max timeout of 1m. Max of 1m will be used", kubeTimeoutStart)
kw.GetWorkceptor().nc.GetLogger().Warning("Invalid value for RECEPTOR_KUBE_RETRY_COUNT: %s. Default of 5 will be used", envRetryCount)
265
+
kubeRetryCount=5
266
+
}
267
+
// ignore if exceeds limit, use max retry
268
+
ifkubeRetryCount>100 {
269
+
kw.GetWorkceptor().nc.GetLogger().Warning("RECEPTOR_KUBE_RETRY_COUNT of: %d is larger than the max retry count of 100. Retry count of 100 will be used", kubeRetryCount)
kw.GetWorkceptor().nc.GetLogger().Debug("Error getting pod while trying to attach stdin: '%s' , continuing try to get pod up to %v more times.", kubeErr, retryCount)
kw.GetWorkceptor().nc.GetLogger().Debug("%s is in an unexpected container state %s. This is unexpected. Will retry %v more times.", podName, containerState, retryCount)
0 commit comments