Skip to content

Commit 58df245

Browse files
committed
More accurately represent the motivation for KubeletConfiguration
Signed-off-by: Laura Lorenz <[email protected]>
1 parent 53356d7 commit 58df245

File tree

1 file changed

+17
-6
lines changed
  • keps/sig-node/4603-tune-crashloopbackoff

1 file changed

+17
-6
lines changed

keps/sig-node/4603-tune-crashloopbackoff/README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,17 +718,28 @@ based config and 2) configuration following the API specification of the
718718
`kubelet.config.k8s.io/v1beta1 KubeletConfiguration` Kind, which is passed to
719719
kubelet as a config file or, beta as of Kubernetes 1.30, a config directory
720720
([ref](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/)).
721+
721722
Since this is a per-node configuration that likely will be set on a subset of
722723
nodes, or potentially even differently per node, it's important that it can be
723-
manipulated per node. By default `KubeletConfiguration` is intended to be shared
724+
manipulated per node. Expected use cases of this type of heterogeneity in
725+
configuration include
726+
727+
* Dedicated node pool for workloads that are expected to rapidly restart
728+
* Config aligned with node labels/pod affinity labels for workloads that are
729+
expected to rapidly restart
730+
* Machine size adjusted config
731+
732+
By default `KubeletConfiguration` is intended to be shared
724733
between nodes, but the beta feature for drop-in configuration files in a
725734
colocated config directory cirumvent this. In addition, `KubeletConfiguration`
726735
drops fields unrecognized by the current kubelet's schema, making it a good
727736
choice to circumvent compatibility issues with n-3 kubelets. While there is an
728737
argument that this could be better manipulated with a command-line flag, so
729-
lifecycle tooling that configures nodes can expose it more transparently, the
730-
advantages to backwards compatibility outweigh this consideration for the alpha
731-
period and will be revisted before beta.
738+
lifecycle tooling that configures nodes can expose it more transparently, that
739+
was an acceptable design change given the introduction of `KubeletConfiguration`
740+
in the first place. In any case, the advantages to backwards and forward
741+
compatibility by far outweigh this consideration for the alpha period and can be
742+
revisted before beta.
732743

733744
### Refactor of recovery threshold
734745

@@ -1500,15 +1511,15 @@ which is a new field in the `KubeletConfiguration` Kind. Based on manual tests
15001511
by the author, adding an unknown field to `KubeletConfiguration` is safe and the
15011512
unknown config field is dropped before addition to the
15021513
`kube-system/kubelet-config` object which is its final destination (for example,
1503-
in the case of n-3 kubelets facing a configuration introduced by this KEP). This
1514+
in the case of n-3 kubelets facing a configuration introduced by this KEP). Ultimately this is supported by the configuratinon of a given Kind's `fieldValidation` strategy in API machinery ([ref](https://github.com/kubernetes/kubernetes/blob/release-1.31/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go#L584)) which, in 1.31+, is set to "warn" by default and is only valid for API objects and it turns out is not explicitly set as `strict` for `KuberntesConfiguration` object so they ultimately bypass this ([ref](https://github.com/kubernetes/kubectl/issues/1663#issuecomment-2392453716)). This
15041515
is not currently tested as far as I can tell in the tests for
15051516
`KubeletConfiguration` (in either the most likely location, in
15061517
[validation_test](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/config/validation/validation_test.go),
15071518
nor other tests in the [config
15081519
package](https://github.com/kubernetes/kubernetes/tree/005f184ab631e52195ed6d129969ff3914d51c98/pkg/kubelet/apis/config))
15091520
and discussions with other contributors indicate that while little in core
15101521
kubernetes does strict parsing, it's not well tested. At minimum as part of this
1511-
implementation a test covering this for `KubeletConfgiuration` objects will be
1522+
implementation a test covering this for `KubeletConfiguration` objects will be
15121523
included in the `config.validation_test` package.
15131524

15141525
### Rollout, Upgrade and Rollback Planning

0 commit comments

Comments
 (0)