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

chore: define public const for the schematic ID extension name #68

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/artifacts/schematic.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/siderolabs/talos/pkg/machinery/extensions"
"gopkg.in/yaml.v3"

"github.com/siderolabs/image-factory/pkg/constants"
"github.com/siderolabs/image-factory/pkg/schematic"
)

Expand Down Expand Up @@ -49,7 +50,7 @@ func schematicExtension(schematicID string) (io.Reader, error) {
manifest := extensions.Manifest{
Version: "v1alpha1",
Metadata: extensions.Metadata{
Name: "schematic",
Name: constants.SchematicIDExtensionName,
Version: schematicID,
Author: "Image Factory",
Description: "Virtual extension which specifies the schematic of the image built with Image Factory.",
Expand Down
10 changes: 10 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// Package constants defines image factory public constants.
package constants

// SchematicIDExtensionName when the image factory generates a Talos image
// it adds special extension into the image that constains schematic ID information.
const SchematicIDExtensionName = "schematic"