Skip to content

Portal slice 4: Expiration, Policies and Capacity: API first, then the tabs #302

Closed
1 of 3 issues completed

Description

@ephico2real2

Part of #20. Today on CRC every tab but Requests shows "This tab is not on the API yet." (cmapi-portal-ui/src/portal/PortalApp.tsx:185). The tab map is cmapi-portal-ui/MOCKUP-CONTRACT.md, "Tabs". Build with /mockup-to-page-react and prove with /test-ui: content and states against the mockup at 390, 820 and 1440 px in both themes, every UI state (loading, empty, forbidden, error, 401), permissions from GET /api/v1/me, browser suites in Chromium and the installed Chrome, mutants killed, and a screenshot through the CRC Route.

None of the three has a list endpoint in the contract (checked 2026-11-15). Only POST .../expiration:extend exists. Design and build each endpoint through the delivery loop, with OpenAPI, samples, docs/04 and the contract gate, then the tab:

  • Expiration: a list of namespaces by expiry.
  • Policies: Kyverno results and rejections.
  • Capacity: the capacity snapshots.

Sub-issues

Sub-issues

1 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added
    enhancement
    status:open
    Backlog
    on Nov 16, 2026
  2. ephico2real2 commented on Nov 17, 2026

    @ephico2real2
    OwnerAuthor

    Found under #318: #319, #320, #321.

  3. ephico2real2 commented on Nov 17, 2026

    @ephico2real2
    OwnerAuthor

    For the Policies part of slice 4 (owner, 2026-11-17): Kyverno defaults to audit (#342), and cmapi's own checks refuse. So the Policies tab is where Kyverno's detail shows: the clusters' PolicyReport results (fail/warn per policy and resource) and, beside cmapi's plan-time refusals, Kyverno's plan-time findings as warnings with policy, rule and message. GET /api/v1/policies/results and /rejections are still to build; #333 widens what the policies check, so the tab must not hard-code the policy list.

  4. ephico2real2 commented on Nov 17, 2026

    @ephico2real2
    OwnerAuthor

    Also for the Policies tab: show the policy engine and each environment's mode (enforce, audit, off) and the pinned Kyverno version, from the existing policy object of the integrations endpoint (schema Policy: engine, environments, kyvernoVersion), so a reader knows whether a Kyverno result was a warning (audit) or a denial (enforce). With engine none, the tab says Kyverno is off and shows cmapi's refusals only.

  5. ephico2real2 commented on Nov 17, 2026

    @ephico2real2
    OwnerAuthor

    Found under the Policies part (PR #384): #385, a service test that names revision 0004 as "newer"; migration 0006 exposes it.

  6. added 7 commits that reference this issue on Nov 17, 2026
  7. ephico2real2 commented on Nov 18, 2026

    @ephico2real2
    OwnerAuthor

    Proof for closure (coordinator, 2026-11-18). All three tabs are on the API on CRC, which runs 1537977 (OB1 run 23).

    Criterion Proof Where
    Expiration: a list of namespaces by expiry GET /api/v1/expirations with :extend, :set, :makePermanent, and the tab PR #322; CRC, deployed 2026-11-16
    Policies: Kyverno results and rejections GET /api/v1/policies/results and /rejections (rejections store the username only), and the tab. CRC shows "off the bundle", 31 missing, because cmapi's bundle is not delivered there. Kind proof with Kyverno v1.20 audit: real fail rows PR #384 (review OB3, 4 fixes); CRC run 21
    Capacity: the capacity snapshots Live from the watch, by the owner's decision of 2026-11-18. Snapshots are #21; usage and history are null in notMeasured. GET /api/v1/capacity and the tab. CRC: 56 % CPU and 45 % memory against the simulated size, the node's allocatable beside it, every figure equal to oc PR #400 (review OB3, 4 fixes); CRC run 23
    API first: OpenAPI, samples, docs/04, contract gate Each route is in cmapi/contract/openapi.json with samples and docs/04 examples; the api-contract CI job passed on each merge PRs #322, #384, #400
    States, permissions from /me, 390/820/1440 in both themes, Chromium and installed Chrome, mutants The portal suite in CI (Chromium); installed Chrome 157 in each PR's evidence; mutants all killed (Policies 16 + 3, Capacity 18) docs/reviews/2026-11-17-issue-302-policies/, docs/reviews/2026-11-18-issue-302-capacity/
    Screenshot through the CRC Route Policies and Capacity as operator and requester, 1440 and 390 px, light theme workbench/cmapi/ob1-run21/screens/, ob1-run23/screens/

    Not proven on CRC: dark theme and 820 px through the Route (proven in CI and locally only); ETag 304 revalidation.

    Open follow-ups, not blocking: #382, #383, #402, #403, #404, #407.

  8. ephico2real2 commented on Nov 18, 2026

    @ephico2real2
    OwnerAuthor

    Closed with the owner's approval (2026-11-18), on the proof in the comment above.

  9. added a commit that references this issue on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlogenhancementstatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions