Skip to content

frontend: Add ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding views#5524

Open
ManthanNimodiya wants to merge 13 commits into
kubernetes-sigs:mainfrom
ManthanNimodiya:feat/validating-admission-policy-ui-4755
Open

frontend: Add ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding views#5524
ManthanNimodiya wants to merge 13 commits into
kubernetes-sigs:mainfrom
ManthanNimodiya:feat/validating-admission-policy-ui-4755

Conversation

@ManthanNimodiya
Copy link
Copy Markdown

Summary

Adds list and detail views for ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding resources under the Configuration section in the sidebar.

Related Issue

Fixes #4755

Changes

  • Added K8s classes for both resources (admissionregistration.k8s.io/v1, cluster-scoped)
  • Added list and detail views for both resources
  • Registered routes and sidebar entries under Configuration
  • Added i18n strings

Steps to Test

  1. Connect Headlamp to a Kubernetes v1.30+ cluster
  2. Expand Configuration in the sidebar — both new entries should appear
  3. Click each — list pages should load without errors

Screenshots

S1 S2 S3

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ManthanNimodiya
Once this PR has been reviewed and has the lgtm label, please assign joaquimrocha for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2026
@illume illume requested a review from Copilot May 10, 2026 17:48
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.

the PR has a merge-main commit; please rebase against main to keep the history clean.

Why this matters

Merge commits from main make the PR history harder to review. Please rebase your branch on top of the latest main instead, then update the PR with the rebased commits.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds UI support in the Headlamp frontend for Kubernetes ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding (admissionregistration.k8s.io/v1) by introducing new K8s resource classes, list/detail pages, routes, and sidebar navigation entries. The PR also includes Helm chart NOTES/README updates about pinned image.tag upgrade behavior (CI status and commit history details were not available in this review context—please confirm checks are green and history is linear).

Changes:

  • Added new K8s resource classes for ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding (cluster-scoped).
  • Added list and detail views, plus routes and sidebar entries under Configuration.
  • Updated Helm chart docs/NOTES to warn about upgrades when image.tag is explicitly set.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/lib/router/index.tsx Registers routes for the new policy and binding list/detail pages.
frontend/src/lib/k8s/validatingAdmissionPolicy.ts Adds the ValidatingAdmissionPolicy KubeObject wrapper and typings.
frontend/src/lib/k8s/validatingAdmissionPolicyBinding.ts Adds the ValidatingAdmissionPolicyBinding KubeObject wrapper and typings.
frontend/src/i18n/locales/en/glossary.json Adds glossary entries for the new sidebar labels.
frontend/src/components/Sidebar/useSidebarItems.tsx Adds sidebar items under Configuration for the new resources.
frontend/src/components/admissionpolicy/ValidatingAdmissionPolicyList.tsx Implements the list view for policies.
frontend/src/components/admissionpolicy/ValidatingAdmissionPolicyDetails.tsx Implements the details view for a policy (validations/constraints/etc).
frontend/src/components/admissionpolicy/ValidatingAdmissionPolicyBindingList.tsx Implements the list view for bindings.
frontend/src/components/admissionpolicy/ValidatingAdmissionPolicyBindingDetails.tsx Implements the details view for a binding (policy link, paramRef, matchResources).
charts/headlamp/templates/NOTES.txt Adds a NOTES warning about pinned image.tag during upgrades.
charts/headlamp/README.md Documents upgrade behavior when image.tag is explicitly set.

Comment thread charts/headlamp/README.md
@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch 2 times, most recently from a3096b7 to d6a65bf Compare May 10, 2026 18:11
@ManthanNimodiya ManthanNimodiya requested a review from illume May 10, 2026 18:12
@illume illume requested a review from Copilot May 11, 2026 05:46
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.

A few of the commits don't quite follow the project guidelines. We use Linux kernel style for git commits — have a look at the contributing guide and previous commits with git log.

Commits that need attention
  • frontend: Add missing i18n keys for ValidatingAdmissionPolicy UI — Only one file changed inside frontend/; add a sub-area so it's clear what was touched (e.g. frontend: ComponentName: description).
Commit guidelines
  • Use atomic commits focused on a single change.
  • Use the title format <area>: <Description of changes> — description must start with a capital letter.
  • Keep the title under 72 characters (soft requirement).
  • Explain the intention and why the change is needed.
  • Make commit titles meaningful and describe what changed.
  • Do not add code that a later commit rewrites; squash or reorder commits instead.
  • Do not include Fixes #NN in commit messages.

Good examples:

  • frontend: HomeButton: Fix so it navigates to home
  • backend: config: Add enable-dynamic-clusters flag

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch 3 times, most recently from d36c89c to 00b6af9 Compare May 11, 2026 06:33
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 11, 2026
@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch from bf7d1a3 to 01d636e Compare May 11, 2026 06:36
@ManthanNimodiya ManthanNimodiya requested a review from illume May 11, 2026 06:37
@illume illume requested a review from Copilot May 11, 2026 15:13
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for these changes.

can you please rebase against main to remove the merge main commit?

Why this matters

Merge commits from main make the PR history harder to review. Please rebase your branch on top of the latest main instead, then update the PR with the rebased commits.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread frontend/src/i18n/locales/en/glossary.json
Comment thread frontend/src/i18n/locales/en/glossary.json
@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch from da4f2c9 to 6333163 Compare May 11, 2026 15:41
@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch from 17a8228 to fe66360 Compare May 14, 2026 17:31
@illume illume requested a review from Copilot May 15, 2026 05:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

@ManthanNimodiya
Copy link
Copy Markdown
Author

@illume, please let me know if any further changes are required

@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch from fe66360 to 89c13cf Compare May 15, 2026 15:21
@illume illume requested a review from Copilot May 15, 2026 18:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

@ManthanNimodiya ManthanNimodiya force-pushed the feat/validating-admission-policy-ui-4755 branch from 89c13cf to eec38fd Compare May 15, 2026 18:50
@ManthanNimodiya
Copy link
Copy Markdown
Author

@illume, all Copilot comments have been addressed. Please take a look when you get a chance.

@illume illume requested a review from Copilot May 16, 2026 10:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 144 out of 149 changed files in this pull request and generated 5 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View/edit ValidatingAdmissionPolicy resources

4 participants