Skip to content

Commit

Permalink
doc: add comments re not propagating failSwapOn in scriptless
Browse files Browse the repository at this point in the history
  • Loading branch information
tallaxes committed Feb 7, 2025
1 parent acab9c7 commit bb19537
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/providers/imagefamily/bootstrap/aksbootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ func KubeletConfigToMap(kubeletConfig *KubeletConfiguration) map[string]string {
if kubeletConfig.ImageGCLowThresholdPercent != nil {
args["--image-gc-low-threshold"] = fmt.Sprintf("%d", ptr.Int32Value(kubeletConfig.ImageGCLowThresholdPercent))
}
// ShouldConfigureSwapFile is currently hardcoded to false, so can't support propagating this yet
// if kubeletConfig.FailSwapOn != nil {
// args["--fail-swap-on"] = fmt.Sprintf("%t", lo.FromPtr(kubeletConfig.FailSwapOn))
//}
if kubeletConfig.CPUCFSQuota != nil {
args["--cpu-cfs-quota"] = fmt.Sprintf("%t", lo.FromPtr(kubeletConfig.CPUCFSQuota))
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/providers/instancetype/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ var _ = Describe("InstanceType Provider", func() {
nodeClass.Spec.Kubelet = &v1alpha2.KubeletConfiguration{
ImageGCHighThresholdPercent: lo.ToPtr(int32(30)),
ImageGCLowThresholdPercent: lo.ToPtr(int32(20)),
FailSwapOn: lo.ToPtr(false), // opposite of default
CPUCFSQuota: lo.ToPtr(true),
}

Expand All @@ -482,6 +483,8 @@ var _ = Describe("InstanceType Provider", func() {
"image-gc-low-threshold": "20",
"cpu-cfs-quota": "true",
"max-pods": "250",
// we don't currently propagate fail-swap-on
// "fail-swap-on": "false",
}

ExpectKubeletFlags(azureEnv, customData, expectedFlags)
Expand Down

0 comments on commit bb19537

Please sign in to comment.