Skip to content

feat: introduce container-level resource setting#1436

Open
kondracek-nr wants to merge 1 commit intomainfrom
kondracek/container-resources
Open

feat: introduce container-level resource setting#1436
kondracek-nr wants to merge 1 commit intomainfrom
kondracek/container-resources

Conversation

@kondracek-nr
Copy link
Copy Markdown
Contributor

@kondracek-nr kondracek-nr commented Mar 18, 2026

Description

This change introduces container-level resource-setting to the kubelet & controlplane components. The ksm component already has container-level resource-setting & this change follows the pattern set by ksm. For now, we will continue to accommodate applying resource values set at the kubelet.resources / controlplane.resources level to each container.

If kubelet.resources is set, the assumption is that the user is still using this config path & isn't aware of container-level resource setting, so an explicit setting at this level is prioritized over the default container-level settings this change introduces. We print a warning message that the behavior of that config path will be changing in the future for pod-level resource setting & to use the container-level config paths.

The reason for this change is as follows:

  • Currently, when users override the default resources for kubelet or control-plane, the same setting is applied to both containers. Containers may not need the same resource settings - this change allows users to set different resources for each.
  • The Windows kubelet DaemonSet currently inherits whatever resources were applied to the Linux DaemonSet. Windows containers often need more robust resources, so it's handy to be able to set these at a different level.
  • Pod-Level Resources are coming. The current configuration applies the same resource settings to each container. This change includes a deprecation notice as we will likely want to use the particular configurations kubelet.resources / controlplane.resources in the future to accommodate pod-level resource setting for our customers.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature / enhancement (non-breaking change which adds functionality)
  • Security fix
  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Add changelog entry following the contributing guide
  • Documentation has been updated
  • This change requires changes in testing:
    • unit tests
    • E2E tests

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.01%. Comparing base (2f7f467) to head (84a9ea5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1436   +/-   ##
=======================================
  Coverage   75.01%   75.01%           
=======================================
  Files          53       53           
  Lines        3706     3706           
=======================================
  Hits         2780     2780           
  Misses        753      753           
  Partials      173      173           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kondracek-nr kondracek-nr force-pushed the kondracek/container-resources branch 3 times, most recently from 749f2ef to 2ad7247 Compare March 18, 2026 19:04
@kondracek-nr kondracek-nr marked this pull request as ready for review March 18, 2026 21:03
@kondracek-nr kondracek-nr requested a review from a team as a code owner March 18, 2026 21:03
@kondracek-nr kondracek-nr force-pushed the kondracek/container-resources branch from 2ad7247 to 8d84bdf Compare March 18, 2026 21:28
@kondracek-nr kondracek-nr force-pushed the kondracek/container-resources branch from 8d84bdf to 84a9ea5 Compare March 18, 2026 22:48
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.

2 participants