Skip to content

metal3: Add Metal3Cluster and Metal3ClusterTemplate views#899

Open
mastermaxx03 wants to merge 3 commits into
headlamp-k8s:mainfrom
mastermaxx03:metal3-cluster
Open

metal3: Add Metal3Cluster and Metal3ClusterTemplate views#899
mastermaxx03 wants to merge 3 commits into
headlamp-k8s:mainfrom
mastermaxx03:metal3-cluster

Conversation

@mastermaxx03

@mastermaxx03 mastermaxx03 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Continues the Metal3 plugin. Adds Metal3Cluster and Metal3ClusterTemplate to the Metal3 section, the CAPM3 resources for the cluster side of a Cluster API cluster on bare metal. More resources and a map view to follow.

Included

  • Metal3Cluster list and detail views with provisioned state, control plane endpoint, and cluster columns.
  • Metal3ClusterTemplate list and detail views with the cloud provider setting.
  • The Metal3 sidebar group extended with the two new entries.

How to test

  • A cluster with the Metal3 and CAPM3 CRDs installed.
  • cd metal3 && npm install && npm start, then run Headlamp.
  • Apply the sample: kubectl apply -f metal3/test-files/metal3cluster.yaml.
  • Open the Metal3 section: the clusters and templates list, and clicking one opens the detail view.

@mastermaxx03

Copy link
Copy Markdown
Contributor Author

@Rozzii @illume RFR!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Extends the metal3 Headlamp plugin with additional Cluster API (CAPM3) infrastructure resources, adding list/detail pages and wiring them into the Metal3 sidebar group for easier navigation while developing/testing locally.

Changes:

  • Add Metal3Cluster + Metal3ClusterTemplate list and detail views (including provisioned status and control plane endpoint).
  • Add Metal3Machine + Metal3MachineTemplate list and detail views, including hostSelector formatting + unit tests.
  • Expand the Metal3 sidebar group with new entries and add sample manifests for local testing.

Reviewed changes

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

Show a summary per file
File Description
metal3/src/index.tsx Adds new Metal3 sidebar entries and routes for machines/clusters and their templates.
metal3/src/Metal3Cluster/List.tsx Implements Metal3Cluster list view with Provisioned/Endpoint/Cluster columns.
metal3/src/Metal3Cluster/Details.tsx Implements Metal3Cluster detail view (provisioned, endpoint, cluster label, cloud provider flag).
metal3/src/Metal3ClusterTemplate/List.tsx Implements Metal3ClusterTemplate list view showing cloud provider enabled setting.
metal3/src/Metal3ClusterTemplate/Details.tsx Implements Metal3ClusterTemplate detail view for the cloud provider enabled setting.
metal3/src/Metal3Machine/List.tsx Implements Metal3Machine list view with Provisioned/ProviderID/Cluster columns.
metal3/src/Metal3Machine/Details.tsx Implements Metal3Machine detail view including image and claimed BareMetalHost annotation.
metal3/src/Metal3MachineTemplate/List.tsx Implements Metal3MachineTemplate list view (nodeReuse, image, hostSelector).
metal3/src/Metal3MachineTemplate/Details.tsx Implements Metal3MachineTemplate detail view (hostSelector, nodeReuse, image, cleaning mode, data template).
metal3/src/Metal3MachineTemplate/hostSelector.ts Adds helper to format a hostSelector into a stable one-line summary.
metal3/src/Metal3MachineTemplate/hostSelector.test.ts Adds vitest unit coverage for hostSelector formatting behavior.
metal3/test-files/metal3cluster.yaml Adds sample Metal3Cluster/Metal3ClusterTemplate objects for local testing.
metal3/test-files/metal3machine.yaml Adds sample Metal3Machine/Metal3MachineTemplate objects for local testing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread metal3/src/Metal3Cluster/List.tsx
Comment thread metal3/src/Metal3Cluster/Details.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread metal3/src/Metal3ClusterTemplate/List.tsx Outdated
Comment thread metal3/src/Metal3ClusterTemplate/Details.tsx
Comment thread metal3/src/Metal3Cluster/Details.tsx
…iews

Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>
…ies and routes

Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>
Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 6 changed files in this pull request and generated no new comments.

@Rozzii Rozzii left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants