talos
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5package profile6
7// Output describes image generation result.
8type Output struct {9// Kind of the output:10// * iso - ISO image11// * image - disk image (Talos pre-installed)12// * installer - installer container13// * kernel - Linux kernel14// * initramfs - initramfs image15Kind OutputKind `yaml:"kind"`16// Options for the 'image' output.17ImageOptions *ImageOptions `yaml:"imageOptions,omitempty"`18// Options for the 'iso' output.19ISOOptions *ISOOptions `yaml:"isoOptions,omitempty"`20// OutFormat is the format for the output:21// * raw - output raw file22// * .tar.gz - output tar.gz archive23// * .xz - output xz archive24// * .gz - output gz archive25OutFormat OutFormat `yaml:"outFormat"`26}
27
28// ImageOptions describes options for the 'image' output.
29type ImageOptions struct {30// DiskSize is the size of the disk image (bytes).31DiskSize int64 `yaml:"diskSize"`32// DiskFormat is the format of the disk image:33// * raw - raw disk image34// * qcow2 - qcow2 disk image35// * vhd - VPC disk image36// * ova - VMWare disk image37DiskFormat DiskFormat `yaml:"diskFormat,omitempty"`38// DiskFormatOptions are additional options for the disk format39DiskFormatOptions string `yaml:"diskFormatOptions,omitempty"`40}
41
42// ISOOptions describes options for the 'iso' output.
43type ISOOptions struct {44// SDBootEnrollKeys is a value in loader.conf secure-boot-enroll: off, manual, if-safe, force.45//46// If not set, it defaults to if-safe.47SDBootEnrollKeys SDBootEnrollKeys `yaml:"sdBootEnrollKeys"`48}
49
50// OutputKind is output specification.
51type OutputKind int52
53// OutputKind values.
54const (55OutKindUnknown OutputKind = iota // unknown56OutKindISO // iso57OutKindImage // image58OutKindInstaller // installer59OutKindKernel // kernel60OutKindInitramfs // initramfs61OutKindUKI // uki62OutKindCmdline // cmdline63)
64
65// OutFormat is output format specification.
66type OutFormat int67
68// OutFormat values.
69const (70OutFormatUnknown OutFormat = iota // unknown71OutFormatRaw // raw72OutFormatTar // .tar.gz73OutFormatXZ // .xz74OutFormatGZ // .gz75OutFormatZSTD // .zst76)
77
78// DiskFormat is disk format specification.
79type DiskFormat int80
81// DiskFormat values.
82const (83DiskFormatUnknown DiskFormat = iota // unknown84DiskFormatRaw // raw85DiskFormatQCOW2 // qcow286DiskFormatVPC // vhd87DiskFormatOVA // ova88)
89
90// SDBootEnrollKeys is a value in loader.conf secure-boot-enroll: off, manual, if-safe, force.
91type SDBootEnrollKeys int92
93// SDBootEnrollKeys values.
94const (95SDBootEnrollKeysIfSafe SDBootEnrollKeys = iota // if-safe96SDBootEnrollKeysManual // manual97SDBootEnrollKeysForce // force98SDBootEnrollKeysOff // off99)
100