-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: restructure HW information in Server
resources (v1alpha2)
#823
Conversation
app/sidero-controller-manager/api/v1alpha1/environment_types.go
Outdated
Show resolved
Hide resolved
This is basically subset of PR siderolabs#735 with only CRD changes without actual code changes to use new CRDs. As storage version is v1alpha2, every access goes twice via conversion webhooks (for better test coverage). Other parts of siderolabs#735 will be incorporated in a follow-up PR, I decided to split things up for easier review. Example: ```bash $ kubectl get servers.v1alpha1.metal.sidero.dev 49fd7c2d-1ba4-4157-8cc0-3f7212f119f0 -o yaml ... cpu: manufacturer: QEMU version: pc-q35-6.0 hostname: pxe-3 managementApi: endpoint: 172.25.0.1:39565 system: family: Unknown manufacturer: QEMU productName: Standard PC (Q35 + ICH9, 2009) serialNumber: Unknown skuNumber: Unknown version: pc-q35-6.0 $ kubectl get servers.v1alpha2.metal.sidero.dev 49fd7c2d-1ba4-4157-8cc0-3f7212f119f0 -o yaml ... hardware: compute: processors: - manufacturer: QEMU productName: pc-q35-6.0 system: family: Unknown manufacturer: QEMU productName: Standard PC (Q35 + ICH9, 2009) serialNumber: Unknown skuNumber: Unknown version: pc-q35-6.0 ``` We can make more changes to v1alpha2 resources in follow-up PRs. Co-authored-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
@@ -0,0 +1,118 @@ | |||
// This Source Code Form is subject to the terms of the Mozilla Public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it would be great to extract that and share the validation code between v1 and v2, but I'm not sure if it goes against the best practices 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, validation might be different across the two I guess? as we evolve the types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may still have common parts I guess.
/m |
This is final part of siderolabs#735, previous part in siderolabs#823. This imports all remaining changes with some fixups minus the webhook changes. This change adds detailed hardware information to the Server CRD. Hardware info is extracted by the agent from SMBIOS. The ServerClass CRD is also updated so more precise qualifiers can be used. Co-authored-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This is final part of siderolabs#735, previous part in siderolabs#823. This imports all remaining changes with some fixups minus the webhook changes. This change adds detailed hardware information to the Server CRD. Hardware info is extracted by the agent from SMBIOS. The ServerClass CRD is also updated so more precise qualifiers can be used. Co-authored-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This is basically subset of PR #735 with only CRD changes without actual
code changes to use new CRDs. As storage version is v1alpha2, every
access goes twice via conversion webhooks (for better test coverage).
Other parts of #735 will be incorporated in a follow-up PR, I decided to
split things up for easier review.
Example:
We can make more changes to v1alpha2 resources in follow-up PRs.
Co-authored-by: Gerard de Leeuw gdeleeuw@leeuwit.nl
Signed-off-by: Gerard de Leeuw gdeleeuw@leeuwit.nl
Signed-off-by: Andrey Smirnov andrey.smirnov@talos-systems.com