Skip to content
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

refactor: extract platform metadata into Talos machinery #10173

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

smira
Copy link
Member

@smira smira commented Jan 20, 2025

It will be used across Image Factory, Terraform Provider and Omni.

Fixes #10108

See siderolabs/image-factory#189

@smira smira added this to the v1.10 milestone Jan 20, 2025

// NotOnlyDiskImage is true if the platform supports boot methods other than disk-image.
func (p Platform) NotOnlyDiskImage() bool {
if len(p.BootMethods) == 1 && p.BootMethods[0] == BootMethodDiskImage {
Copy link
Member

Choose a reason for hiding this comment

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

is the BootMethods slice deterministic?, since MetalPlatform has pxe as the first boot method, shouldn't the second condition be slices.Contains?

Copy link
Member Author

Choose a reason for hiding this comment

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

This method basically checks BootMethods != {BootMethodDiskImage}, it has nothing to do with the order specifically.

If only disk image is used, we can skip installer.

It will be used across Image Factory, Terraform Provider and Omni.

Fixes siderolabs#10108

See siderolabs/image-factory#189

Signed-off-by: Andrey Smirnov <[email protected]>
@smira smira force-pushed the refactor/platform-metadata branch from 9c96052 to e1efbf6 Compare January 20, 2025 13:30
@smira
Copy link
Member Author

smira commented Jan 20, 2025

/m

@talos-bot talos-bot merged commit e1efbf6 into siderolabs:main Jan 20, 2025
51 checks passed
smira added a commit to smira/terraform-provider-talos that referenced this pull request Jan 20, 2025
smira added a commit to smira/terraform-provider-talos that referenced this pull request Jan 20, 2025
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.

Define supported platforms, single board computers in the machinery module
4 participants