kueue: Add Kueue ClusterQueue views#864
Conversation
Signed-off-by: Utkarshpandey0001 <rajutkarshpandey2003@gmail.com>
053f2c2 to
f8f233d
Compare
There was a problem hiding this comment.
Pull request overview
Adds ClusterQueue support to the Headlamp Kueue plugin, expanding the plugin beyond ResourceFlavor to include ClusterQueue list/detail navigation and typed modeling for kueue.x-k8s.io/v1beta2.
Changes:
- Introduces a typed
ClusterQueueresource model plus formatter utilities for rendering key spec/status fields. - Adds ClusterQueue list/detail pages and wires them into routes + sidebar navigation.
- Updates tests, sample manifests, and README usage instructions for the new resource.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| kueue/test-files/deploy/clusterqueue-team-a.yaml | Adds a sample ClusterQueue manifest for local testing/demo. |
| kueue/src/utils/kueueRoutes.ts | Adds ClusterQueue list/detail route names and paths. |
| kueue/src/utils/kueueApi.test.ts | Extends route-path tests to cover ClusterQueue routes. |
| kueue/src/resources/clusterQueueFormatters.ts | Adds formatter helpers for displaying ClusterQueue spec/status data. |
| kueue/src/resources/clusterQueue.ts | Adds the typed ClusterQueue model (spec/status interfaces + computed display getters). |
| kueue/src/resources/clusterQueue.test.ts | Adds basic formatter unit tests for ClusterQueue formatting helpers. |
| kueue/src/index.tsx | Registers ClusterQueue sidebar entry and routes; makes ClusterQueues the default Kueue landing page. |
| kueue/src/components/clusterqueues/List.tsx | Adds ClusterQueue list view with key columns (cohort, quotas, workload counts, status). |
| kueue/src/components/clusterqueues/Detail.tsx | Adds ClusterQueue detail view showing formatted spec/status fields. |
| kueue/README.md | Updates documentation to reflect ClusterQueue support and example usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function renderLabelSelector(selector?: LabelSelectorLike) { | ||
| if (!selector) { | ||
| return '-'; | ||
| } |
| }, | ||
| { | ||
| name: 'Conditions', | ||
| value: clusterQueue.conditionsDisplay, |
There was a problem hiding this comment.
Can you check how Headlamp displays conditions for workloads?
There can be many conditions and I worry the UX on this would be subpar.
There was a problem hiding this comment.
Let me look into it once. I will get back to you in a while
| - coveredResources: | ||
| - cpu | ||
| - memory | ||
| flavors: |
There was a problem hiding this comment.
Displaying the flavors does not look good.
As we add more flavors or resourceGroups I worry this would become difficult to parse.
@illume curious on how we should render these arrays?
There was a problem hiding this comment.
Hmm... can we go with a separate section that will show resource flavour. Let me do some hit and trial then i will back to you
There was a problem hiding this comment.
The status fields are also important to call out as an array.
Resource Groups, Reservations, Usage.
|
Is there a way for you to render example screenshots via the PR build process? I'm having trouble figuring out how to get a local view of this. |
|
hi @amy , i am attaching screenshots of it. Give me a moment |
| ? [ | ||
| { | ||
| name: 'Cohort', | ||
| value: clusterQueue.cohortName, |
There was a problem hiding this comment.
@amy brought this up to me.
Cohorts can be a string and a reference to a Cohort object. if they are a reference to a Cohort we should have a click to take to the cohort resource.
This doesn't have to be solved here but wanted to bring it up when you take on Cohorts.
Summary
Adds support for Kueue
ClusterQueueresources in the Headlamp Kueue plugin.Changes
ClusterQueueresource model forkueue.x-k8s.io/v1beta2Testing
cd kueue npm run tsc npm run lint node_modules/.bin/vitest run -c node_modules/@kinvolk/headlamp-plugin/config/vite.config.mjs npm run build