Skip to content

feat(adminqos): add memory plugin config support - #215

Merged
xu282934741 merged 1 commit into
kubewharf:mainfrom
tituschewxj:dev/titus/add-memorypluginconfig-to-qrmpluginconfig
Aug 21, 2026
Merged

feat(adminqos): add memory plugin config support#215
xu282934741 merged 1 commit into
kubewharf:mainfrom
tituschewxj:dev/titus/add-memorypluginconfig-to-qrmpluginconfig

Conversation

@tituschewxj

@tituschewxj tituschewxj commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

add MemoryPluginConfig field to QRMPluginConfig, define new FragMemConfig and HostWatermarkConfig types, and add their autogenerated deepcopy implementations

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

English

API surface

  • Added optional MemoryPluginConfig to QRMPluginConfig.
  • Added MemoryPluginConfig, FragMemConfig, and HostWatermarkConfig.
  • Added settings for memory compaction, THP behavior, VM watermarks, and reserved kswapd memory.

Compatibility

  • Additive optional pointer fields preserve compatibility with existing configurations.
  • Downstream consumers can read and apply these settings when present.
  • Consumers must handle omitted nested configurations and pointer fields.

Code generation

  • Added generated deepcopy methods for the new types.
  • Updated QRMPluginConfig deepcopy handling for MemoryPluginConfig.
  • No documentation-only changes are included.
  • No CRD changes are identified in the provided changes.

简体中文

API surface

  • QRMPluginConfig 添加可选的 MemoryPluginConfig
  • 添加 MemoryPluginConfigFragMemConfigHostWatermarkConfig
  • 添加内存压缩、THP 行为、VM watermark 以及 reserved kswapd memory 设置。

兼容性

  • 新增的可选指针字段保持现有配置兼容。
  • 配置存在时,下游消费者可以读取并应用这些设置。
  • 下游消费者必须处理缺失的嵌套配置和指针字段。

代码生成

  • 为新类型添加生成的 deepcopy 方法。
  • 更新 QRMPluginConfigMemoryPluginConfig 的 deepcopy 处理。
  • 本次变更不包含仅文档变更。
  • 根据提供的变更内容,未发现 CRD 变更。

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ae272189-9a8a-48de-857a-02daffad7b63

📥 Commits

Reviewing files that changed from the base of the PR and between a300231 and 6b16cfc.

📒 Files selected for processing (1)
  • pkg/apis/config/v1alpha1/zz_generated.deepcopy.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/apis/config/v1alpha1/zz_generated.deepcopy.go

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The configuration API adds optional memory fragmentation, THP, and host-watermark settings. Generated deepcopy methods copy these settings through nested configuration objects.

配置 API 新增可选的内存碎片整理、THP 和主机水位设置。生成的深拷贝方法会复制这些嵌套配置对象。

Changes

Memory configuration API / 内存配置 API

Layer / File(s) Summary
Memory configuration schema
pkg/apis/config/v1alpha1/adminqos.go
QRMPluginConfig now includes MemoryPluginConfig. The new types define fragmentation, THP, VM watermark, and reserved kswapd memory settings.

QRMPluginConfig 现在包含 MemoryPluginConfig。新增类型定义内存碎片整理、THP、VM 水位和预留 kswapd 内存设置。
Memory configuration deepcopy
pkg/apis/config/v1alpha1/zz_generated.deepcopy.go
Generated methods copy all new pointer fields and nested configurations. QRMPluginConfig.DeepCopyInto now copies MemoryPluginConfig.

生成的方法复制所有新增指针字段和嵌套配置。QRMPluginConfig.DeepCopyInto 现在会复制 MemoryPluginConfig

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6b16c

The PR adds configuration API types, generated deepcopy support, and CRD definitions; no actionable merge-blocking risk remains based on the supplied evidence.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the added memory plugin configuration support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/apis/config/v1alpha1/adminqos.go`:
- Around line 417-424: Preserve the existing v1alpha1 exported fields and JSON
tags in FragMemConfig and HostWatermarkConfig as deprecated compatibility
fields, while retaining the renamed fields only if needed for the new API shape.
Ensure old manifest keys continue to deserialize and remain represented in
generated CRDs; do not replace the prior fields or wire keys without adding an
explicit API-version conversion and migration.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bdf5314b-8204-4409-8ed1-156f82d2dbe0

📥 Commits

Reviewing files that changed from the base of the PR and between 92098ce and f231913.

⛔ Files ignored due to path filters (1)
  • config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml is excluded by !config/crd/bases/**
📒 Files selected for processing (2)
  • pkg/apis/config/v1alpha1/adminqos.go
  • pkg/apis/config/v1alpha1/zz_generated.deepcopy.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/apis/config/v1alpha1/zz_generated.deepcopy.go

Comment thread pkg/apis/config/v1alpha1/adminqos.go
add MemoryPluginConfig field to QRMPluginConfig, define new FragMemConfig and HostWatermarkConfig types, and add their autogenerated deepcopy implementations

refactor(adminqos): rename fragmem and hostwatermark configs and generate crds

refactor: align hostwaterconfig comment naming

refactor: fix hostwatermarkconfig comments
@tituschewxj
tituschewxj force-pushed the dev/titus/add-memorypluginconfig-to-qrmpluginconfig branch from a300231 to 6b16cfc Compare August 17, 2026 06:36
@junyu-peng junyu-peng added the workflow/need-review review: test succeeded, need to review label Aug 20, 2026
@xu282934741
xu282934741 merged commit 30cad9a into kubewharf:main Aug 21, 2026
5 checks passed
@tituschewxj tituschewxj removed the workflow/need-review review: test succeeded, need to review label Aug 21, 2026
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