Skip to content

Expose more helm config for agent - #4630

Merged
volcano-sh-bot merged 1 commit into
volcano-sh:masterfrom
Monokaix:colocation
Sep 22, 2025
Merged

Expose more helm config for agent#4630
volcano-sh-bot merged 1 commit into
volcano-sh:masterfrom
Monokaix:colocation

Conversation

@Monokaix

@Monokaix Monokaix commented Sep 22, 2025

Copy link
Copy Markdown
Member

What type of PR is this?

/kind feature
/area colocation

What this PR does / why we need it:

Add more helm config agent_supported_features, agent_extend_resource_cpu_name, agent_extend_resource_memory_name, and more importantly, user can use volcano user mode colocation and do not depend on specific OS.
Based on #4409 and #4413

For example, user can use volcano agent colocation features without depending on specific OS with the following installation command:
helm install volcano . --create-namespace -n volcano-system --set custom.colocation_enable=true --set "custom.agent_supported_features=OverSubscription\,Eviction\,Resources" --set custom.agent_extend_resource_cpu_name=test.com/cpu --set custom.agent_extend_resource_memory_name=test.com/gpu

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

User now can use volcano's user mode colocation and are no longer dependent on a specific OS.

Copilot AI review requested due to automatic review settings September 22, 2025 06:28
@volcano-sh-bot volcano-sh-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 22, 2025
@volcano-sh-bot volcano-sh-bot added the area/colocation issues or PRs related to colocation features label Sep 22, 2025
@volcano-sh-bot volcano-sh-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 22, 2025
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @Monokaix, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances Volcano's colocation capabilities by introducing a time-based QoS policy for dynamic workload management and by extending the agent's configurability via Helm. Additionally, it refactors the nodegroup scheduler plugin to support hierarchical queues, allowing for more flexible and manageable node affinity configurations across different queue levels. These changes aim to provide greater control over resource utilization and scheduling behavior in complex Kubernetes environments.

Highlights

  • Enhanced Agent Configuration for Colocation: The Volcano agent now exposes additional Helm configuration parameters, specifically agent_supported_features, agent_extend_resource_cpu_name, and agent_extend_resource_memory_name. This allows users to configure the agent for user-mode colocation without being dependent on a specific operating system, enhancing flexibility and compatibility.
  • Introduction of Time-Based QoS Policy: A new Time-Based QoS Policy feature has been introduced, enabling automated QoS level adjustments for co-located workloads based on predefined time schedules. This allows for dynamic resource management, such as prioritizing online services during peak hours and batch jobs during off-peak hours, by adjusting pod QoS levels accordingly.
  • Hierarchical Queue Support for NodeGroup Plugin: The NodeGroup scheduler plugin now supports hierarchical queues with affinity inheritance. Child queues can inherit nodegroup affinity configurations from their parent or nearest ancestor queues, simplifying configuration management for complex organizational structures and allowing for overrides when needed.
  • Pod Original QoS Level Annotation: A new pod annotation, volcano.sh/original-qos-level, has been added. This annotation is used to persist a pod's original QoS level before it is modified by a time-based QoS policy, ensuring that the original level can be restored when the policy expires or is no longer active.
  • Time-Based QoS Policy Validation: New validation logic has been implemented for Time-Based QoS Policies, ensuring that configuration fields like StartTime, EndTime, TimeZone, Selector, TargetQoSLevel, and CheckInterval are correctly formatted and present, improving the robustness of policy definitions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@volcano-sh-bot volcano-sh-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 22, 2025

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two significant features: time-based QoS policies for the Volcano agent and hierarchical queue affinity for the nodegroup scheduler plugin. The changes are extensive, including new design documents, implementation across agent and scheduler packages, and updates to Helm charts and tests. My review identifies a critical initialization bug in the new TimeBasedQoSHandle that could cause a runtime panic. I've also pointed out a logic issue in the nodegroup plugin's predicate function, inconsistencies in naming and documentation, and some stale TODO comments. Overall, the features are well-designed, but the identified issues, especially the critical bug, should be addressed before merging.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

colocation_enable: false
ignored_provisioners: ~
agent_supported_features: ~
agent_extend_resource_cpu_name: ~

@kingeasternsun kingeasternsun Sep 22, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add comments explaining the valid values
that can be configured for the following three fields:

# for example:
#   agent_supported_features: 
#         - xxx
#         - yyyy
#   agent_extend_resource_cpu_name: 
#         - xxx
#         - yyyy
#   agent_extend_resource_memory_name: 
#         - xxx
#         - yyyy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Monokaix <changxuzheng@huawei.com>
@Monokaix

Copy link
Copy Markdown
Member Author

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2025
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 22, 2025
@volcano-sh-bot
volcano-sh-bot merged commit bbfbe2d into volcano-sh:master Sep 22, 2025
19 of 20 checks passed
@Monokaix
Monokaix deleted the colocation branch September 23, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/colocation issues or PRs related to colocation features kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants