metal3: Add Metal3Data, Metal3DataClaim, and Metal3DataTemplate views#900
Draft
mastermaxx03 wants to merge 6 commits into
Draft
metal3: Add Metal3Data, Metal3DataClaim, and Metal3DataTemplate views#900mastermaxx03 wants to merge 6 commits into
mastermaxx03 wants to merge 6 commits into
Conversation
Contributor
Author
|
@Rozzii would like your input! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the Metal3 Headlamp plugin by expanding the Metal3 section with additional Cluster API Provider Metal3 (CAPM3) resource views and wiring them into the plugin’s sidebar/routes, plus sample manifests for local testing.
Changes:
- Add list/detail views for Metal3Data, Metal3DataClaim, and Metal3DataTemplate resources (v1beta2) guarded by CRD presence.
- Add list/detail views for Metal3Machine/Metal3MachineTemplate and Metal3Cluster/Metal3ClusterTemplate resources (v1beta2), including a hostSelector formatter with unit tests.
- Extend the Metal3 sidebar group and register routes for all of the above, plus new sample YAMLs under
metal3/test-files/.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| metal3/src/index.tsx | Registers the Metal3 sidebar group plus routes/entries for machines, clusters, and data resources. |
| metal3/src/Metal3Machine/List.tsx | Adds Metal3Machine list view with provisioned/providerID/cluster columns. |
| metal3/src/Metal3Machine/Details.tsx | Adds Metal3Machine detail view showing provisioned, provider ID, image, and host annotation. |
| metal3/src/Metal3MachineTemplate/List.tsx | Adds Metal3MachineTemplate list view including hostSelector formatting. |
| metal3/src/Metal3MachineTemplate/Details.tsx | Adds Metal3MachineTemplate detail view (host selector, node reuse, image, cleaning mode, data template). |
| metal3/src/Metal3MachineTemplate/hostSelector.ts | Implements formatHostSelector for a readable selector summary. |
| metal3/src/Metal3MachineTemplate/hostSelector.test.ts | Unit tests for formatHostSelector. |
| metal3/src/Metal3Cluster/List.tsx | Adds Metal3Cluster list view with provisioned, endpoint, and cluster columns. |
| metal3/src/Metal3Cluster/Details.tsx | Adds Metal3Cluster detail view with endpoint and cloud provider flag. |
| metal3/src/Metal3ClusterTemplate/List.tsx | Adds Metal3ClusterTemplate list view with cloud provider enabled column. |
| metal3/src/Metal3ClusterTemplate/Details.tsx | Adds Metal3ClusterTemplate detail view showing cloud provider enabled. |
| metal3/src/Metal3Data/List.tsx | Adds Metal3Data list view with Ready and Index columns. |
| metal3/src/Metal3Data/Details.tsx | Adds Metal3Data detail view showing Ready, Index, Template, Claim, and Error. |
| metal3/src/Metal3DataClaim/List.tsx | Adds Metal3DataClaim list view showing renderedData reference. |
| metal3/src/Metal3DataClaim/Details.tsx | Adds Metal3DataClaim detail view showing template/renderedData/error. |
| metal3/src/Metal3DataTemplate/List.tsx | Adds Metal3DataTemplate list view showing clusterName. |
| metal3/src/Metal3DataTemplate/Details.tsx | Adds Metal3DataTemplate detail view showing clusterName and metadata entry count. |
| metal3/test-files/metal3machine.yaml | Adds sample Metal3Machine + Metal3MachineTemplate manifest. |
| metal3/test-files/metal3cluster.yaml | Adds sample Metal3Cluster + Metal3ClusterTemplate manifest. |
| metal3/test-files/metal3data.yaml | Adds sample Metal3DataTemplate + Metal3DataClaim + Metal3Data manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+44
to
+45
| dataTemplate: | ||
| name: sample-metadata |
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { DetailsGrid } from '@kinvolk/headlamp-plugin/lib/CommonComponents'; |
Comment on lines
+59
to
+62
| { | ||
| name: 'Template', | ||
| value: item.jsonData.spec?.template?.name || '-', | ||
| }, |
Comment on lines
+63
to
+66
| { | ||
| name: 'Claim', | ||
| value: item.jsonData.spec?.claim?.name || '-', | ||
| }, |
Comment on lines
+69
to
+75
| { | ||
| id: 'index', | ||
| label: 'Index', | ||
| getValue: (d: KubeObject) => | ||
| d.jsonData.spec?.index === undefined ? '-' : String(d.jsonData.spec.index), | ||
| }, | ||
| 'age', |
65f50e7 to
f82ae17
Compare
…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>
…and detail views Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>
…sidebar entries and routes Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>
Signed-off-by: mastermaxx03 <srivastavaanimesh22@gmail.com>
f82ae17 to
4b724c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #899 (which is stacked on #892).
Summary
Continues the Metal3 plugin. Adds Metal3Data, Metal3DataClaim, and Metal3DataTemplate to the Metal3 section, the CAPM3 resources that render and hand out per-node metadata and network data on bare metal. More resources and a map view to follow.
Included
How to test