Skip to content

fix(chart): add standard labels to webhook, monitor role, and runtime class - #2985

Open
magic-peach wants to merge 1 commit into
Project-HAMi:masterfrom
magic-peach:fix-chart-missing-labels
Open

fix(chart): add standard labels to webhook, monitor role, and runtime class#2985
magic-peach wants to merge 1 commit into
Project-HAMi:masterfrom
magic-peach:fix-chart-missing-labels

Conversation

@magic-peach

@magic-peach magic-peach commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
MutatingWebhookConfiguration (charts/hami/templates/scheduler/webhook.yaml), the device plugin monitor ClusterRole (charts/hami/templates/device-plugin/monitorrole.yaml), and the RuntimeClass (charts/hami/templates/device-plugin/runtime-class.yaml) had no labels at all, unlike nearly every other resource in the chart, including other cluster scoped ones like the scheduler ClusterRole and the device plugin ClusterRoleBinding. This adds the same standard labels those already have. The webhook config in particular is the most operationally significant resource in the chart, so missing labels there makes it harder to find with label selector based tooling.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Verified with helm lint and helm template --show-only on all three files: labels render correctly, no other output changed.

Does this PR introduce a user-facing change?:
No behavior change; adds standard app.kubernetes.io/* and helm.sh/chart labels to three resources that previously had none.


This PR was written primarily by Claude Code, an AI assistant, under my direction and review. I verified the change with helm lint and helm template and reviewed the diff before submitting.

Summary by CodeRabbit

  • Enhancements
    • Added standard Kubernetes metadata labels to device plugin monitoring, runtime class, and scheduler webhook resources.
    • Improved resource identification and consistency across deployed components.

MutatingWebhookConfiguration, the device plugin monitor ClusterRole,
and the RuntimeClass had no labels at all, unlike nearly every other
resource in the chart including other cluster scoped ones. Missing
this on the webhook config in particular makes it harder to find with
label selector queries since it is the most operationally significant
resource here.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@hami-robot

hami-robot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: magic-peach
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: fcc61a8a-140c-4682-8ba0-612a64f528c8

📥 Commits

Reviewing files that changed from the base of the PR and between 4434305 and c976f86.

📒 Files selected for processing (3)
  • charts/hami/templates/device-plugin/monitorrole.yaml
  • charts/hami/templates/device-plugin/runtime-class.yaml
  • charts/hami/templates/scheduler/webhook.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Helm templates add component-specific and shared chart labels to the device-plugin monitor ClusterRole, device-plugin RuntimeClass, and scheduler MutatingWebhookConfiguration.

Changes

Helm resource labeling

Layer / File(s) Summary
Add labels to Kubernetes resources
charts/hami/templates/device-plugin/monitorrole.yaml, charts/hami/templates/device-plugin/runtime-class.yaml, charts/hami/templates/scheduler/webhook.yaml
The three resource templates now include component labels and labels from the hami-vgpu.labels helper.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to c976f

This change adds consistent labels to the webhook, monitor ClusterRole, and RuntimeClass without changing their functional behavior. No current merge-readiness risk remains.

🚥 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 main change: adding standard labels to the webhook, monitor role, and runtime class.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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

A rabbit tags each chart with care
Device and scheduler labels share
Three resources gain their mark
Clean metadata lights the dark
Helm hops onward, neat and fair

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

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 71.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@github-actions github-actions Bot added kind/bug Something isn't working and removed kind/cleanup labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant