Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Agent] Support for the Agent to modify its own container resource limits #6314

Merged
merged 2 commits into from
May 11, 2024

Conversation

TomatoMr
Copy link
Contributor

@TomatoMr TomatoMr commented May 3, 2024

This PR is for:

  • Agent

Support for the Agent to modify its own container resource limits

  • Added max_millicpus configuration, where the effective limit is the smaller value between max_millicpus and max_cpus.
  • Container resource limitations are no longer dependent on YAML settings and are uniformly issued by the server.
  • The minimum granularity for CPU resource limitations is milli-cores.
  • Deprecated the environment variable K8S_MEM_LIMIT_FOR_DEEPFLOW.
  • Refactored environment.rs to differentiate handling for Linux and Windows.

Checklist

  • Added unit test.

Backport to branches

  • main

@TomatoMr TomatoMr marked this pull request as draft May 4, 2024 03:34
agent/Cargo.toml Outdated Show resolved Hide resolved
agent/src/config/handler.rs Outdated Show resolved Hide resolved
@TomatoMr TomatoMr force-pushed the modify_k8s_limit_main branch 2 times, most recently from 1f8c859 to dd53bf2 Compare May 6, 2024 04:57
agent/src/config/handler.rs Outdated Show resolved Hide resolved
agent/src/config/handler.rs Outdated Show resolved Hide resolved
agent/src/config/handler.rs Outdated Show resolved Hide resolved
agent/src/config/handler.rs Outdated Show resolved Hide resolved
agent/src/monitor.rs Outdated Show resolved Hide resolved
agent/src/utils/environment/linux.rs Show resolved Hide resolved
agent/src/utils/environment/linux.rs Outdated Show resolved Hide resolved
agent/src/utils/guard.rs Outdated Show resolved Hide resolved
agent/src/utils/kubernetes_quantity.rs Outdated Show resolved Hide resolved
agent/src/utils/kubernetes_quantity.rs Outdated Show resolved Hide resolved
agent/src/config/config.rs Outdated Show resolved Hide resolved
@TomatoMr TomatoMr force-pushed the modify_k8s_limit_main branch 2 times, most recently from 18c2943 to 9feb83e Compare May 6, 2024 12:30
agent/src/config/config.rs Outdated Show resolved Hide resolved
@TomatoMr TomatoMr marked this pull request as ready for review May 11, 2024 07:03
@TomatoMr TomatoMr requested a review from rvql May 11, 2024 07:04
@sharang sharang enabled auto-merge (rebase) May 11, 2024 07:12
@sharang sharang merged commit 0649deb into main May 11, 2024
8 checks passed
@sharang sharang deleted the modify_k8s_limit_main branch May 11, 2024 07:21
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.

3 participants