frontend: Add ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding views#5524
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ManthanNimodiya The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
illume
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
ValidatingAdmissionPolicyandValidatingAdmissionPolicyBinding(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.tagis 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. |
a3096b7 to
d6a65bf
Compare
illume
left a comment
There was a problem hiding this comment.
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 insidefrontend/; 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 #NNin commit messages.
Good examples:
frontend: HomeButton: Fix so it navigates to homebackend: config: Add enable-dynamic-clusters flag
d36c89c to
00b6af9
Compare
bf7d1a3 to
01d636e
Compare
illume
left a comment
There was a problem hiding this comment.
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.
da4f2c9 to
6333163
Compare
17a8228 to
fe66360
Compare
|
@illume, please let me know if any further changes are required |
fe66360 to
89c13cf
Compare
89c13cf to
eec38fd
Compare
|
@illume, all Copilot comments have been addressed. Please take a look when you get a chance. |
…ngAdmissionPolicyBinding views
Summary
Adds list and detail views for
ValidatingAdmissionPolicyandValidatingAdmissionPolicyBindingresources under the Configuration section in the sidebar.Related Issue
Fixes #4755
Changes
admissionregistration.k8s.io/v1, cluster-scoped)Steps to Test
Screenshots