Skip to content

Conversation

@koooosh
Copy link
Contributor

@koooosh koooosh commented Oct 8, 2025

Issue #, if available:
bottlerocket-os/bottlerocket#4058
bottlerocket-os/bottlerocket#4544
bottlerocket-os/bottlerocket#4643
bottlerocket-os/bottlerocket#4675

Description of changes:

Add the following k8s settings:

Also, bumping settings-models version to 0.17.0 + updating changelog for new release.

Testing Description:

Note: This also tests the imageMinimumGCAge and imageMaximumGCAge settings added in #87

  1. cargo test
  2. Built a custom k8s-1.29 variant (with ImageMaximumGCAge feature gate) and created a nodegroup with it and the following userdata:
bottlerocket:
      settings:
        kubernetes:
          image-minimum-gc-age: "2m0s"
          image-maximum-gc-age: "24h0s"
          max-parallel-image-pulls: 10
  • Node joined the cluster
  • Settings persisted
[ssm-user@control]$ apiclient get settings.kubernetes.image-maximum-gc-age
{
  "settings": {
    "kubernetes": {
      "image-maximum-gc-age": "24h0s"
    }
  }
}
[ssm-user@control]$ apiclient get settings.kubernetes.image-minimum-gc-age
{
  "settings": {
    "kubernetes": {
      "image-minimum-gc-age": "2m0s"
    }
  }
}
[ssm-user@control]$ apiclient get settings.kubernetes.max-parallel-image-pulls
{
  "settings": {
    "kubernetes": {
      "max-parallel-image-pulls": 10
    }
  }
}
  • Kubelet config rendered
bash-5.1# cat /etc/kubernetes/kubelet/config
...
enableDebuggingHandlers: false
imageMinimumGCAge: 2m0s
imageMaximumGCAge: 24h0s
maxParallelImagePulls: 10
featureGates:
  ImageMaximumGCAge: true
  1. Built a custom k8s-1.33 variant (with idsPerPod) and created a nodegroup with it and the following userdata:
bottlerocket:
      settings:
        kubernetes:
          image-minimum-gc-age: "3m0s"
          image-maximum-gc-age: "24h0s"
          max-parallel-image-pulls: 10
          ids-per-pod: 131072
  • Node joined the cluster
  • Settings persisted
[ssm-user@control]$ apiclient get settings.kubernetes.ids-per-pod
{
  "settings": {
    "kubernetes": {
      "ids-per-pod": 131072
    }
  }
}
[ssm-user@control]$ apiclient get settings.kubernetes.image-minimum-gc-age
{
  "settings": {
    "kubernetes": {
      "image-minimum-gc-age": "3m0s"
    }
  }
}
[ssm-user@control]$ apiclient get settings.kubernetes.image-maximum-gc-age
{
  "settings": {
    "kubernetes": {
      "image-maximum-gc-age": "24h0s"
    }
  }
}
[ssm-user@control]$ apiclient get settings.kubernetes.max-parallel-image-pulls
{
  "settings": {
    "kubernetes": {
      "max-parallel-image-pulls": 10
    }
  }
}
  • Kubelet config rendered
bash-5.1# cat /etc/kubernetes/kubelet/config
...
enableDebuggingHandlers: false
imageMinimumGCAge: 3m0s
imageMaximumGCAge: 24h0s
idsPerPod: 131072
maxParallelImagePulls: 10

Beta options testing

  1. Control (since we are editing older kubelet configs): Built a custom k8s-1.29 variant and created a nodegroup with it and the following userdata:
bottlerocket:
      settings:
        kubernetes:
          cpu-manager-policy: "static"   # Must be set to static to apply below options
          cpu-manager-policy-options: ["full-pcpus-only"]
  • Node joined the cluster
  • Settings persisted
[ssm-user@control]$ apiclient get settings.kubernetes.cpu-manager-policy-options
{
  "settings": {
    "kubernetes": {
      "cpu-manager-policy-options": [
        "full-pcpus-only"
      ]
    }
  }
}
  • Kubelet config rendered
  1. Built a custom k8s-1.34 variant (as it has all new options) and created a nodegroup with it and the following userdata:
bottlerocket:
      settings:
        kubernetes:
          cpu-manager-policy: "static"  # Must be set to static to apply below options
          cpu-manager-policy-options: ["full-pcpus-only", "distribute-cpus-across-numa", "prefer-align-cpus-by-uncorecache", "strict-cpu-reservation"]
  • Node joined the cluster: prefer-align-cpus-by-uncorecache and distribute-cpus-across-numa options cannot be used together, so verified this works for both combinations
  • Settings persisted
[ssm-user@control]$ apiclient get settings.kubernetes.cpu-manager-policy-options
{
  "settings": {
    "kubernetes": {
      "cpu-manager-policy-options": [
        "full-pcpus-only",
        "distribute-cpus-across-numa",
        "prefer-align-cpus-by-uncorecache",
        "strict-cpu-reservation"
      ]
    }
  }
}
  • Kubelet config rendered

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@koooosh
Copy link
Contributor Author

koooosh commented Oct 9, 2025

^ Force push removes my commit adding imageMaximumGCAge (since that's handled by #87) and adds a commit for the 0.17.0 release

@koooosh koooosh marked this pull request as ready for review October 9, 2025 20:41
@horjulf
Copy link

horjulf commented Oct 23, 2025

@koooosh Thank you for working on this!

@piyush-jena Is this still in time to be released with v1.50 ?

@koooosh
Copy link
Contributor Author

koooosh commented Nov 4, 2025

Force push addresses above minor comments + includes commit adding new Beta options for cpu-manager-policy-options

@koooosh koooosh merged commit 724d2fc into bottlerocket-os:develop Nov 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants