Documentation ¶
Index ¶
- Constants
- func BoolToPtr(b bool) *bool
- func CreateReadyUnitFile(provider define.VMType, opts *ReadyUnitOpts) (string, error)
- func DefaultReadyUnitFile() parser.UnitFile
- func EncodeDataURLPtr(contents string) *string
- func GetNetRecoveryFile() string
- func GetNetRecoveryUnitFile() *parser.UnitFile
- func GetPodmanDockerTmpConfig(uid int, rootful bool, newline bool) string
- func IntToPtr(i int) *int
- func SetIgnitionFile(loc *define.VMFile, vmtype define.VMType, vmName, vmConfigDir string) error
- func StrToPtr(s string) *string
- type Clevis
- type Config
- type Custom
- type Device
- type Directory
- type DirectoryEmbedded1
- type Disk
- type Dropin
- type DynamicIgnition
- type File
- type FileEmbedded1
- type Filesystem
- type FilesystemOption
- type Group
- type HTTPHeader
- type HTTPHeaders
- type Ignition
- type IgnitionBuilder
- type IgnitionConfig
- type Link
- type LinkEmbedded1
- type Luks
- type LuksOption
- type MountOption
- type NoProxyItem
- type Node
- type NodeGroup
- type NodeUser
- type Partition
- type Passwd
- type PasswdGroup
- type PasswdUser
- type Proxy
- type Raid
- type RaidOption
- type ReadyUnitOpts
- type Resource
- type SSHAuthorizedKey
- type Security
- type Storage
- type Systemd
- type TLS
- type Tang
- type Timeouts
- type Unit
- type Verification
Constants ¶
const ( PodmanDockerTmpConfPath = "/etc/tmpfiles.d/podman-docker.conf" DefaultIgnitionUserName = "core" )
Variables ¶
This section is empty.
Functions ¶
func CreateReadyUnitFile ¶
func CreateReadyUnitFile(provider define.VMType, opts *ReadyUnitOpts) (string, error)
CreateReadyUnitFile makes the ready unit to report back to the host that the system is running
func DefaultReadyUnitFile ¶
func EncodeDataURLPtr ¶
func GetNetRecoveryFile ¶
func GetNetRecoveryFile() string
func GetNetRecoveryUnitFile ¶
func SetIgnitionFile ¶
SetIgnitionFile creates a new Machine File for the machine's ignition file and assigns the handle to `loc`
Types ¶
type Directory ¶
type Directory struct { Node DirectoryEmbedded1 }
type DirectoryEmbedded1 ¶
type DirectoryEmbedded1 struct {
Mode *int `json:"mode,omitempty"`
}
type DynamicIgnition ¶
type DynamicIgnition struct { Name string Key string TimeZone string UID int VMName string VMType define.VMType WritePath string Cfg Config Rootful bool NetRecover bool }
func (*DynamicIgnition) GenerateIgnitionConfig ¶
func (ign *DynamicIgnition) GenerateIgnitionConfig() error
GenerateIgnitionConfig
func (*DynamicIgnition) Write ¶
func (ign *DynamicIgnition) Write() error
type File ¶
type File struct { Node FileEmbedded1 }
type FileEmbedded1 ¶
type Filesystem ¶
type Filesystem struct { Device string `json:"device"` Format *string `json:"format,omitempty"` Label *string `json:"label,omitempty"` MountOptions []MountOption `json:"mountOptions,omitempty"` Options []FilesystemOption `json:"options,omitempty"` Path *string `json:"path,omitempty"` UUID *string `json:"uuid,omitempty"` WipeFilesystem *bool `json:"wipeFilesystem,omitempty"` }
type FilesystemOption ¶
type FilesystemOption string
type HTTPHeader ¶
type HTTPHeaders ¶
type HTTPHeaders []HTTPHeader
type Ignition ¶
type Ignition struct { Config IgnitionConfig `json:"config,omitempty"` Proxy Proxy `json:"proxy,omitempty"` Security Security `json:"security,omitempty"` Timeouts Timeouts `json:"timeouts,omitempty"` Version string `json:"version,omitempty"` }
type IgnitionBuilder ¶
type IgnitionBuilder struct {
// contains filtered or unexported fields
}
func NewIgnitionBuilder ¶
func NewIgnitionBuilder(dynamicIgnition DynamicIgnition) IgnitionBuilder
NewIgnitionBuilder generates a new IgnitionBuilder type using the base `DynamicIgnition` object
func (*IgnitionBuilder) Build ¶
func (i *IgnitionBuilder) Build() error
Build writes the internal `DynamicIgnition` config to its write path
func (*IgnitionBuilder) BuildWithIgnitionFile ¶
func (i *IgnitionBuilder) BuildWithIgnitionFile(ignPath string) error
BuildWithIgnitionFile copies the provided ignition file into the internal `DynamicIgnition` write path
func (*IgnitionBuilder) GenerateIgnitionConfig ¶
func (i *IgnitionBuilder) GenerateIgnitionConfig() error
GenerateIgnitionConfig generates the ignition config
func (*IgnitionBuilder) WithFile ¶
func (i *IgnitionBuilder) WithFile(files ...File)
WithFile adds storage files to the internal `DynamicIgnition` config
func (*IgnitionBuilder) WithUnit ¶
func (i *IgnitionBuilder) WithUnit(units ...Unit)
WithUnit adds systemd units to the internal `DynamicIgnition` config
type IgnitionConfig ¶
type Link ¶
type Link struct { Node LinkEmbedded1 }
type LinkEmbedded1 ¶
type Luks ¶
type Luks struct { Clevis *Clevis `json:"clevis,omitempty"` Device *string `json:"device,omitempty"` KeyFile Resource `json:"keyFile,omitempty"` Label *string `json:"label,omitempty"` Name string `json:"name"` Options []LuksOption `json:"options,omitempty"` UUID *string `json:"uuid,omitempty"` WipeVolume *bool `json:"wipeVolume,omitempty"` }
type LuksOption ¶
type LuksOption string
type MountOption ¶
type MountOption string
type NoProxyItem ¶
type NoProxyItem string
type NodeGroup ¶
func GetNodeGrp ¶
type NodeUser ¶
func GetNodeUsr ¶
type Partition ¶
type Partition struct { GUID *string `json:"guid,omitempty"` Label *string `json:"label,omitempty"` Number int `json:"number,omitempty"` Resize *bool `json:"resize,omitempty"` ShouldExist *bool `json:"shouldExist,omitempty"` SizeMiB *int `json:"sizeMiB,omitempty"` StartMiB *int `json:"startMiB,omitempty"` TypeGUID *string `json:"typeGuid,omitempty"` WipePartitionEntry *bool `json:"wipePartitionEntry,omitempty"` }
type Passwd ¶
type Passwd struct { Groups []PasswdGroup `json:"groups,omitempty"` Users []PasswdUser `json:"users,omitempty"` }
type PasswdGroup ¶
type PasswdUser ¶
type PasswdUser struct { Gecos *string `json:"gecos,omitempty"` Groups []Group `json:"groups,omitempty"` HomeDir *string `json:"homeDir,omitempty"` Name string `json:"name"` NoCreateHome *bool `json:"noCreateHome,omitempty"` NoLogInit *bool `json:"noLogInit,omitempty"` NoUserGroup *bool `json:"noUserGroup,omitempty"` PasswordHash *string `json:"passwordHash,omitempty"` PrimaryGroup *string `json:"primaryGroup,omitempty"` SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty"` Shell *string `json:"shell,omitempty"` ShouldExist *bool `json:"shouldExist,omitempty"` System *bool `json:"system,omitempty"` UID *int `json:"uid,omitempty"` }
type Proxy ¶
type Proxy struct { HTTPProxy *string `json:"httpProxy,omitempty"` HTTPSProxy *string `json:"httpsProxy,omitempty"` NoProxy []NoProxyItem `json:"noProxy,omitempty"` }
type Raid ¶
type Raid struct { Devices []Device `json:"devices"` Level string `json:"level"` Name string `json:"name"` Options []RaidOption `json:"options,omitempty"` Spares *int `json:"spares,omitempty"` }
type RaidOption ¶
type RaidOption string
type ReadyUnitOpts ¶
type ReadyUnitOpts struct {
Port uint64
}
ReadyUnitOpts are options for creating the ready unit that reports back to podman when the system is booted
type Resource ¶
type Resource struct { Compression *string `json:"compression,omitempty"` HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"` Source *string `json:"source,omitempty"` Verification Verification `json:"verification,omitempty"` }
type SSHAuthorizedKey ¶
type SSHAuthorizedKey string
type Storage ¶
type Storage struct { Directories []Directory `json:"directories,omitempty"` Disks []Disk `json:"disks,omitempty"` Files []File `json:"files,omitempty"` Filesystems []Filesystem `json:"filesystems,omitempty"` Links []Link `json:"links,omitempty"` Luks []Luks `json:"luks,omitempty"` Raid []Raid `json:"raid,omitempty"` }
type TLS ¶
type TLS struct {
CertificateAuthorities []Resource `json:"certificateAuthorities,omitempty"`
}
type Verification ¶
type Verification struct {
Hash *string `json:"hash,omitempty"`
}