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: keps/sig-node/4603-tune-crashloopbackoff/README.md
+39-6Lines changed: 39 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1154,16 +1154,52 @@ to revisiting the CrashLoopBackoff behaviors for common use cases:
1154
1154
1155
1155
For step (2), the method to allow the Pods to opt-in was by a new enum value,
1156
1156
`Rapid`, for a Pod's `RestartPolicy`. In this case, Pods and restartable init
1157
-
(aka sidecar) containers will be able to set a new OneOf value, `restartPolicy:
1157
+
(aka sidecar) containers would be able to set a new OneOf value, `restartPolicy:
1158
1158
Rapid`, to opt in to an exponential backoff decay that starts at a lower initial
1159
-
value and maximizes to a lower cap. This proposal suggests we start with a new
1159
+
value and maximizes to a lower cap. This proposal suggested we start with a new
1160
1160
initial value of 250ms and cap of 1 minute, and analyze its impact on
1161
1161
infrastructure during alpha.
1162
1162
1163
1163

1166
1166
1167
+
**Why not?**: There was still a general community consensus that even though
1168
+
this was opt-in, giving the power to reduce the backoff curve to users in
1169
+
control of the pod manifest -- who as a persona are not necessarily users with
1170
+
cluster-wide or at least node-wide visibility into load and scheduling -- was
1171
+
too risky to global node stability.
1172
+
1173
+
In addition, overriding an existing Pod spec
1174
+
enum value, while convenient, required detailed management of the version skew
1175
+
period, at minimum across 3 kubelet versions per the [API policy for new enum values in existing fields](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#new-enum-value-in-existing-field). In practice
1176
+
this meant the API server and kubelets across all nodes must be coordinated.
1177
+
1178
+
Firstly, `Rapid` must be a valid option to the `restartPolicy` in the API server
1179
+
(which would only be possible if/when the API server was updated), and secondly,
1180
+
the `Rapid` value must be interpretable by all kubelets on every node.
1181
+
Unfortunately, it is not possible for the API server to be aware of what version
1182
+
each kubelet is on, so it cannot serve `Rapid` as `Always` preferentially to
1183
+
each kubelet depending on its version. Instead, each kubelet must be able to
1184
+
handle this value properly, both at n-3 kubelet version and -- more easily -- at
1185
+
its contemporary kubelet version. For updated kubelet versions, each kubelet
1186
+
would be able to detect if it has the feature gate on, and if so, interpret
1187
+
`Rapid`to use the new rapid backoff curve; and if the feature gate is off,
1188
+
interpret it instead as `Always`. But at earlier kubelet versions, `Rapid` must
1189
+
be ignored in favor of `Always`. Unfortunately for this KEP, the default value
1190
+
for `restartPolicy` is Never, though even more unfortunately, it looks like
1191
+
different code paths use a different default value (thank you
0 commit comments