image

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeISO = "iso"
	TypeRAW = "raw"

	ArchTypeX86 Arch = "x86_64"
	ArchTypeARM Arch = "aarch64"

	KubernetesDistroRKE2 = "rke2"
	KubernetesDistroK3S  = "k3s"

	KubernetesNodeTypeServer = "server"
	KubernetesNodeTypeAgent  = "agent"

	CNITypeNone   = "none"
	CNITypeCilium = "cilium"
	CNITypeCanal  = "canal"
	CNITypeCalico = "calico"
)

Variables

View Source
var ErrorInvalidSchemaVersion = errors.New("invalid schema version")

Functions

This section is empty.

Types

type AddRepo

type AddRepo struct {
	URL      string `yaml:"url"`
	Unsigned bool   `yaml:"unsigned"`
}

type Arch

type Arch string

func (Arch) Short

func (a Arch) Short() string

type ArtifactSources added in v1.1.0

type ArtifactSources struct {
	MetalLB struct {
		Chart      string `yaml:"chart"`
		Repository string `yaml:"repository"`
		Version    string `yaml:"version"`
	} `yaml:"metallb"`
	EndpointCopierOperator struct {
		Chart      string `yaml:"chart"`
		Repository string `yaml:"repository"`
		Version    string `yaml:"version"`
	} `yaml:"endpoint-copier-operator"`
	Kubernetes struct {
		K3s struct {
			SELinuxPackage    string `yaml:"selinuxPackage"`
			SELinuxRepository string `yaml:"selinuxRepository"`
		} `yaml:"k3s"`
		Rke2 struct {
			SELinuxPackage    string `yaml:"selinuxPackage"`
			SELinuxRepository string `yaml:"selinuxRepository"`
		} `yaml:"rke2"`
	} `yaml:"kubernetes"`
}

type ContainerImage

type ContainerImage struct {
	Name string `yaml:"name"`
}

type Context

type Context struct {
	// ImageConfigDir is the root directory storing all configuration files.
	ImageConfigDir string
	// BuildDir is the directory used for assembling the different components used in a build.
	BuildDir string
	// CombustionDir is a subdirectory under BuildDir containing the Combustion script and its smaller related files.
	CombustionDir string
	// ArtefactsDir is a subdirectory under BuildDir containing the larger Combustion related files.
	ArtefactsDir string
	// ImageDefinition contains the image definition properties.
	ImageDefinition *Definition
	// ArtifactSources contains the information necessary for the deployment of external artifacts.
	ArtifactSources *ArtifactSources
	// CacheDir contains all of the artifacts that are cached for the build process.
	CacheDir string
}

type Definition

type Definition struct {
	APIVersion               string                   `yaml:"apiVersion"`
	Image                    Image                    `yaml:"image"`
	OperatingSystem          OperatingSystem          `yaml:"operatingSystem"`
	EmbeddedArtifactRegistry EmbeddedArtifactRegistry `yaml:"embeddedArtifactRegistry"`
	Kubernetes               Kubernetes               `yaml:"kubernetes"`
}

func ParseDefinition

func ParseDefinition(data []byte) (*Definition, error)

type DiskSize

type DiskSize string

func (DiskSize) IsValid

func (d DiskSize) IsValid() bool

func (DiskSize) ToMB

func (d DiskSize) ToMB() int64

type EmbeddedArtifactRegistry

type EmbeddedArtifactRegistry struct {
	ContainerImages []ContainerImage `yaml:"images"`
	Registries      []Registry       `yaml:"registries"`
}

type Helm

type Helm struct {
	Charts       []HelmChart      `yaml:"charts"`
	Repositories []HelmRepository `yaml:"repositories"`
}

type HelmAuthentication

type HelmAuthentication struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type HelmChart

type HelmChart struct {
	Name                  string   `yaml:"name"`
	ReleaseName           string   `yaml:"releaseName"`
	RepositoryName        string   `yaml:"repositoryName"`
	Version               string   `yaml:"version"`
	TargetNamespace       string   `yaml:"targetNamespace"`
	CreateNamespace       bool     `yaml:"createNamespace"`
	InstallationNamespace string   `yaml:"installationNamespace"`
	ValuesFile            string   `yaml:"valuesFile"`
	APIVersions           []string `yaml:"apiVersions"`
}

type HelmRepository

type HelmRepository struct {
	Name           string             `yaml:"name"`
	URL            string             `yaml:"url"`
	Authentication HelmAuthentication `yaml:"authentication"`
	PlainHTTP      bool               `yaml:"plainHTTP"`
	SkipTLSVerify  bool               `yaml:"skipTLSVerify"`
	CAFile         string             `yaml:"caFile"`
}

type Image

type Image struct {
	ImageType       string `yaml:"imageType"`
	Arch            Arch   `yaml:"arch"`
	BaseImage       string `yaml:"baseImage"`
	OutputImageName string `yaml:"outputImageName"`
}

type IsoConfiguration

type IsoConfiguration struct {
	InstallDevice string `yaml:"installDevice"`
}

type Kubernetes

type Kubernetes struct {
	Version   string    `yaml:"version"`
	Network   Network   `yaml:"network"`
	Nodes     []Node    `yaml:"nodes"`
	Manifests Manifests `yaml:"manifests"`
	Helm      Helm      `yaml:"helm"`
}

type LocalRPMConfig

type LocalRPMConfig struct {
	// RPMPath is the path to the directory holding RPMs that will be side-loaded
	RPMPath string
	// GPGKeysPath specifies the path to the directory that holds the GPG keys that the side-loaded RPMs have been signed with
	GPGKeysPath string
}

type Manifests

type Manifests struct {
	URLs []string `yaml:"urls"`
}

type Network

type Network struct {
	APIHost string `yaml:"apiHost"`
	APIVIP4 string `yaml:"apiVIP"`
	APIVIP6 string `yaml:"apiVIP6"`
}

type Node

type Node struct {
	Hostname    string `yaml:"hostname"`
	Type        string `yaml:"type"`
	Initialiser bool   `yaml:"initializer"`
}

type NtpConfiguration

type NtpConfiguration struct {
	ForceWait bool     `yaml:"forceWait"`
	Pools     []string `yaml:"pools"`
	Servers   []string `yaml:"servers"`
}

type OperatingSystem

type OperatingSystem struct {
	KernelArgs       []string               `yaml:"kernelArgs"`
	Groups           []OperatingSystemGroup `yaml:"groups"`
	Users            []OperatingSystemUser  `yaml:"users"`
	Systemd          Systemd                `yaml:"systemd"`
	Suma             Suma                   `yaml:"suma"`
	Packages         Packages               `yaml:"packages"`
	IsoConfiguration IsoConfiguration       `yaml:"isoConfiguration"`
	RawConfiguration RawConfiguration       `yaml:"rawConfiguration"`
	Time             Time                   `yaml:"time"`
	Proxy            Proxy                  `yaml:"proxy"`
	Keymap           string                 `yaml:"keymap"`
	EnableFIPS       bool                   `yaml:"enableFIPS"`
}

type OperatingSystemGroup

type OperatingSystemGroup struct {
	Name string `yaml:"name"`
	GID  int    `yaml:"gid"`
}

type OperatingSystemUser

type OperatingSystemUser struct {
	Username          string   `yaml:"username"`
	UID               int      `yaml:"uid"`
	EncryptedPassword string   `yaml:"encryptedPassword"`
	SSHKeys           []string `yaml:"sshKeys"`
	PrimaryGroup      string   `yaml:"primaryGroup"`
	SecondaryGroups   []string `yaml:"secondaryGroups"`
	CreateHomeDir     bool     `yaml:"createHomeDir"`
}

type Packages

type Packages struct {
	NoGPGCheck      bool      `yaml:"noGPGCheck"`
	EnableExtras    bool      `yaml:"enableExtras"`
	PKGList         []string  `yaml:"packageList"`
	AdditionalRepos []AddRepo `yaml:"additionalRepos"`
	RegCode         string    `yaml:"sccRegistrationCode"`
}

type Proxy

type Proxy struct {
	HTTPProxy  string   `yaml:"httpProxy"`
	HTTPSProxy string   `yaml:"httpsProxy"`
	NoProxy    []string `yaml:"noProxy"`
}

type RawConfiguration

type RawConfiguration struct {
	DiskSize                 DiskSize `yaml:"diskSize"`
	LUKSKey                  string   `yaml:"luksKey"`
	ExpandEncryptedPartition bool     `yaml:"expandEncryptedPartition"`
}

type Registry added in v1.2.0

type Registry struct {
	URI            string                 `yaml:"uri"`
	Authentication RegistryAuthentication `yaml:"authentication"`
}

type RegistryAuthentication added in v1.2.0

type RegistryAuthentication struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Suma

type Suma struct {
	Host          string `yaml:"host"`
	ActivationKey string `yaml:"activationKey"`
}

type Systemd

type Systemd struct {
	Enable  []string `yaml:"enable"`
	Disable []string `yaml:"disable"`
}

type Time

type Time struct {
	Timezone         string           `yaml:"timezone"`
	NtpConfiguration NtpConfiguration `yaml:"ntp"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL