Skip to content

Commit

Permalink
fix: invert the condition to skip kubelet kernel checks
Browse files Browse the repository at this point in the history
We should skip the checks on container platforms, as Talos has no way to
enforce conditions on the host kernel.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Mar 16, 2022
1 parent cf85b3f commit 327ce5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/controllers/k8s/kubelet_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (ctrl *KubeletSpecController) Run(ctx context.Context, r controller.Runtime
// If our platform is container, we cannot rely on the ability to change kernel parameters.
// Therefore, we need to NOT attempt to enforce the kernel parameter checking done by the kubelet
// when the `ProtectKernelDefaults` setting is enabled.
if ctrl.V1Alpha1Mode != v1alpha1runtime.ModeContainer {
if ctrl.V1Alpha1Mode == v1alpha1runtime.ModeContainer {
kubeletConfig.ProtectKernelDefaults = false
}

Expand Down

0 comments on commit 327ce5a

Please sign in to comment.