talos

Форк
0
/
output.go 
99 строк · 3.2 Кб
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

5
package profile
6

7
// Output describes image generation result.
8
type Output struct {
9
	// Kind of the output:
10
	//  * iso - ISO image
11
	//  * image - disk image (Talos pre-installed)
12
	//  * installer - installer container
13
	//  * kernel - Linux kernel
14
	//  * initramfs - initramfs image
15
	Kind OutputKind `yaml:"kind"`
16
	// Options for the 'image' output.
17
	ImageOptions *ImageOptions `yaml:"imageOptions,omitempty"`
18
	// Options for the 'iso' output.
19
	ISOOptions *ISOOptions `yaml:"isoOptions,omitempty"`
20
	// OutFormat is the format for the output:
21
	//  * raw - output raw file
22
	//  * .tar.gz - output tar.gz archive
23
	//  * .xz - output xz archive
24
	//  * .gz - output gz archive
25
	OutFormat OutFormat `yaml:"outFormat"`
26
}
27

28
// ImageOptions describes options for the 'image' output.
29
type ImageOptions struct {
30
	// DiskSize is the size of the disk image (bytes).
31
	DiskSize int64 `yaml:"diskSize"`
32
	// DiskFormat is the format of the disk image:
33
	//  * raw - raw disk image
34
	//  * qcow2 - qcow2 disk image
35
	//  * vhd - VPC disk image
36
	//  * ova - VMWare disk image
37
	DiskFormat DiskFormat `yaml:"diskFormat,omitempty"`
38
	// DiskFormatOptions are additional options for the disk format
39
	DiskFormatOptions string `yaml:"diskFormatOptions,omitempty"`
40
}
41

42
// ISOOptions describes options for the 'iso' output.
43
type 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.
47
	SDBootEnrollKeys SDBootEnrollKeys `yaml:"sdBootEnrollKeys"`
48
}
49

50
// OutputKind is output specification.
51
type OutputKind int
52

53
// OutputKind values.
54
const (
55
	OutKindUnknown   OutputKind = iota // unknown
56
	OutKindISO                         // iso
57
	OutKindImage                       // image
58
	OutKindInstaller                   // installer
59
	OutKindKernel                      // kernel
60
	OutKindInitramfs                   // initramfs
61
	OutKindUKI                         // uki
62
	OutKindCmdline                     // cmdline
63
)
64

65
// OutFormat is output format specification.
66
type OutFormat int
67

68
// OutFormat values.
69
const (
70
	OutFormatUnknown OutFormat = iota // unknown
71
	OutFormatRaw                      // raw
72
	OutFormatTar                      // .tar.gz
73
	OutFormatXZ                       // .xz
74
	OutFormatGZ                       // .gz
75
	OutFormatZSTD                     // .zst
76
)
77

78
// DiskFormat is disk format specification.
79
type DiskFormat int
80

81
// DiskFormat values.
82
const (
83
	DiskFormatUnknown DiskFormat = iota // unknown
84
	DiskFormatRaw                       // raw
85
	DiskFormatQCOW2                     // qcow2
86
	DiskFormatVPC                       // vhd
87
	DiskFormatOVA                       // ova
88
)
89

90
// SDBootEnrollKeys is a value in loader.conf secure-boot-enroll: off, manual, if-safe, force.
91
type SDBootEnrollKeys int
92

93
// SDBootEnrollKeys values.
94
const (
95
	SDBootEnrollKeysIfSafe SDBootEnrollKeys = iota // if-safe
96
	SDBootEnrollKeysManual                         // manual
97
	SDBootEnrollKeysForce                          // force
98
	SDBootEnrollKeysOff                            // off
99
)
100

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.