Repository navigation
feat(ui): manage EgressPolicies from the UI - #3542
Charlesthebird merged 6 commits into
Conversation
Add an EgressPolicyService (list, get, create, update, delete) and a Policies section in the UI: list, details with a "Used by" table, a create and edit form, and egress policy selection on the agent form. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
Show a policy as not applied only when the agent's condition names it, and show no "Used by" count for namespaces whose agents could not be read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
Name the policy by namespace in the list confirm, label the destination inputs, and move focus after adding or removing a destination. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
Report a policy as not yet evaluated when the agent's condition is older than its generation, and say "Used by" counts only what the user can see. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
This comment has been minimized.
This comment has been minimized.
Charlesthebird
left a comment
There was a problem hiding this comment.
This automated review is a first pass. A manual review will follow once the blockers are addressed.
The name check rejects dotted names, so a policy created with kubectl as api.github.com can't be saved from the edit page. The sidebar label and not-found page asks are inline.
⚠️ What I checked
- ✅ Form rules vs the CRD in
egresspolicy_types.go: origin pattern, length caps, blocked headers, one ofsecretKeyRef/actorJwt, audiences, token lifetime, wildcard without auth, 1–64 destinations. - ✅ Stale save:
kubecrudreturnsAborted, the form shows the reload prompt, and the mock does the same. - ✅ Status:
EgressPoliciesApplied=Falseno longer marks an agent failed; oldobservedGenerationreads as not reported. - ✅ Agent form caps refs at 16 and drops the field when cleared.
- ✅ RBAC: method policy covers all five RPCs, management role adds write verbs, kubecrud checks auth per call.
- Resource name validation on create and edit.
Written by 🤖
Charlesthebird
left a comment
There was a problem hiding this comment.
Adding a couple of notes here:
Could the code around “EgressPoliciesPage” and text for that page also be updated to make it match up with the idea that this is a “Policies” page, with a list of "Egress Policies" and then specify that it’s “Create Egress Policy” at the top?
You could use the structure from the agents page to explain the egress policy and what it is, and then include one tab for "Egress Policies". This could be a small simple diagram, and the text here could be concise and match the style from the agents page.
Add a Policies page with an Egress Policies tab and a short overview, allow DNS subdomain policy names on create and edit, and list Policies on the Not Found page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alan Bentley <alanbentleypgh@gmail.com>
|
The section is now a Policies page with one Egress Policies tab, a "Create egress policy" button and a short overview with a diagram, in 🤖 written by Claude |
|
Re-recorded on a real kind cluster at
reel-full.mp4Screenshots🤖 written by Claude |



























🤖 written by Claude (start)
Closes #3526
Summary
EgressPolicyService(list, get, create, update, delete) and gives the management role write access toegresspolicies.Abortedfrom the sharedkubecrudpath, so the form can ask for a reload.EgressPoliciesAppliedcondition is false no longer shows as failed.Testing
ui/, setENABLE_MOCK_UI=truein.env, then runyarn dev. Mock mode serves fixtures, not real data./policies. Search, filter by namespace, and open a policy.For a real cluster, run
scripts/setup-cluster/setup-cluster.shand repeat with policies applied throughkubectl.🤖 written by Claude (end)