Documentation ¶
Index ¶
- func IsExecutionFailed(err error) bool
- func IsInvalidConfig(err error) bool
- func PXEManager(c PXEManagerConfiguration, cluster *hostmgr.Cluster) (*pxeManagerT, error)
- type CaReference
- type Config
- type ConfigReference
- type Configuration
- type Create
- type CreateOption
- type DNSmasqConfiguration
- type DNSmasqInstance
- type Device
- type Directory
- type Disk
- type EtcdNode
- type EtcdResponse
- type EtcdResponseError
- type File
- type FileContents
- type Files
- type Filesystem
- type Group
- type Ignition
- type IgnitionConfig
- type Link
- type Mount
- type MountOption
- type Network
- type NetworkInterface
- type NetworkModel
- type NetworkRange
- type NetworkRoute
- type Networkd
- type NetworkdDropin
- type Networkdunit
- type Node
- type NodeGroup
- type NodeUser
- type PXEManagerConfiguration
- type Partition
- type Passwd
- type PasswdGroup
- type PasswdUser
- type Profile
- type Raid
- type RaidOption
- type SSHAuthorizedKey
- type Security
- type Storage
- type Systemd
- type SystemdDropin
- type TLS
- type Timeouts
- type Unit
- type Usercreate
- type UsercreateGroup
- type Verification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExecutionFailed ¶
IsExecutionFailed asserts executionFailedError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func PXEManager ¶
func PXEManager(c PXEManagerConfiguration, cluster *hostmgr.Cluster) (*pxeManagerT, error)
Types ¶
type CaReference ¶
type CaReference struct { Source string `json:"source,omitempty" yaml:"source,omitempty"` Verification Verification `json:"verification,omitempty" yaml:"verification,omitempty"` }
This schema structure is based on github.com/coreos/ignition/config/v2_2/types/schema.go Due to issue with unmarshalling embedded anonymous nested structures, this file removes such structures. Changed types: Directory, File, Link.
type Config ¶
type Config struct { Ignition Ignition `json:"ignition" yaml:"ignition,omitempty"` Networkd Networkd `json:"networkd,omitempty" yaml:"networkd,omitempty"` Passwd Passwd `json:"passwd,omitempty" yaml:"passwd,omitempty"` Storage Storage `json:"storage,omitempty" yaml:"storage,omitempty"` Systemd Systemd `json:"systemd,omitempty" yaml:"systemd,omitempty"` }
type ConfigReference ¶
type ConfigReference struct { Source string `json:"source,omitempty" yaml:"source,omitempty"` Verification Verification `json:"verification,omitempty" yaml:"verification,omitempty"` }
type Configuration ¶
type Configuration struct { DefaultFlatcarVersion string `yaml:"default_flatcar_version"` Network Network Profiles []Profile TemplatesEnv map[string]interface{} `yaml:"templates_env"` }
func LoadConfig ¶
func LoadConfig(filePath string) (Configuration, error)
type Create ¶
type Create struct { Force bool `json:"force,omitempty" yaml:"force,omitempty"` Options []CreateOption `json:"options,omitempty" yaml:"options,omitempty"` }
type CreateOption ¶
type CreateOption string
type DNSmasqConfiguration ¶
type DNSmasqInstance ¶
type DNSmasqInstance struct {
// contains filtered or unexported fields
}
func NewDNSmasq ¶
func NewDNSmasq(baseFile string, conf DNSmasqConfiguration) *DNSmasqInstance
func (*DNSmasqInstance) Restart ¶
func (dnsmasq *DNSmasqInstance) Restart() error
func (*DNSmasqInstance) Start ¶
func (dnsmasq *DNSmasqInstance) Start() error
type Directory ¶
type Directory struct { Filesystem string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` Group *NodeGroup `json:"group,omitempty" yaml:"group,omitempty"` Mode *int `json:"mode,omitempty" yaml:"mode,omitempty"` Overwrite *bool `json:"overwrite,omitempty" yaml:"overwrite,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` User *NodeUser `json:"user,omitempty" yaml:"user,omitempty"` }
type EtcdResponse ¶
type EtcdResponseError ¶
type File ¶
type File struct { Append bool `json:"append,omitempty" yaml:"append,omitempty"` Contents FileContents `json:"contents,omitempty" yaml:"contents,omitempty"` Filesystem string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` Mode int `json:"mode,omitempty" yaml:"mode,omitempty"` Group *NodeGroup `json:"group,omitempty" yaml:"group,omitempty"` Overwrite *bool `json:"overwrite,omitempty" yaml:"overwrite,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` User *NodeUser `json:"user,omitempty" yaml:"user,omitempty"` }
type FileContents ¶
type FileContents struct { Compression string `json:"compression,omitempty" yaml:"compression,omitempty"` Source string `json:"source,omitempty" yaml:"source,omitempty"` Verification Verification `json:"verification,omitempty" yaml:"verification,omitempty"` }
type Files ¶
Files is map[string]string for files that we fetched from disk and then filled with data.
type Filesystem ¶
type Ignition ¶
type Ignition struct { Config IgnitionConfig `json:"config,omitempty" yaml:"config,omitempty"` Security Security `json:"security,omitempty" yaml:"security,omitempty"` Timeouts Timeouts `json:"timeouts,omitempty" yaml:"timeouts,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` }
type IgnitionConfig ¶
type IgnitionConfig struct { Append []ConfigReference `json:"append,omitempty" yaml:"append,omitempty"` Replace *ConfigReference `json:"replace,omitempty" yaml:"replace,omitempty"` }
type Link ¶
type Link struct { Filesystem string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` Group *NodeGroup `json:"group,omitempty" yaml:"group,omitempty"` Hard bool `json:"hard,omitempty" yaml:"hard,omitempty"` Overwrite *bool `json:"overwrite,omitempty" yaml:"overwrite,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` Target string `json:"target,omitempty" yaml:"target,omitempty"` User *NodeUser `json:"user,omitempty" yaml:"user,omitempty"` }
type Mount ¶
type Mount struct { Create *Create `json:"create,omitempty" yaml:"create,omitempty"` Device string `json:"device,omitempty" yaml:"device,omitempty"` Format string `json:"format,omitempty" yaml:"format,omitempty"` Label *string `json:"label,omitempty" yaml:"label,omitempty"` Options []MountOption `json:"options,omitempty" yaml:"options,omitempty"` UUID *string `json:"uuid,omitempty" yaml:"uuid,omitempty"` WipeFilesystem bool `json:"wipeFilesystem,omitempty" yaml:"wipeFilesystem,omitempty"` }
type MountOption ¶
type MountOption string
type Network ¶
type Network struct { BindAddr string `yaml:"bind_addr"` PXE struct { Enabled bool PxeInterface NetworkInterface `yaml:"pxe_interface"` } `yaml:"pxe"` PrimaryNIC NetworkInterface `yaml:"primary_nic"` ExtraNICs []NetworkInterface `yaml:"extra_nics"` // if set true use UEFI boot, otherwise use legacy BIOS UEFI bool // NTP list for installed machines NTP []string IgnoredHosts []string StaticHosts []hostmgr.IPMac }
type NetworkInterface ¶
type NetworkInterface struct { Routes []NetworkRoute `yaml:"routes"` InterfaceName string `yaml:"interface_name"` IPRange NetworkRange `yaml:"ip_range"` SubnetSize string `yaml:"subnet_size"` SubnetGateway string `yaml:"subnet_gateway"` Model NetworkModel `yaml:"network_model"` DNS []string `yaml:"dns"` }
type NetworkModel ¶
type NetworkRange ¶
type NetworkRoute ¶
type Networkd ¶
type Networkd struct {
Units []Networkdunit `json:"units,omitempty" yaml:"units,omitempty"`
}
type NetworkdDropin ¶
type Networkdunit ¶
type Networkdunit struct { Contents string `json:"contents,omitempty" yaml:"contents,omitempty"` Dropins []NetworkdDropin `json:"dropins,omitempty" yaml:"dropins,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` }
type Node ¶
type Node struct { Filesystem string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` Group *NodeGroup `json:"group,omitempty" yaml:"group,omitempty"` Overwrite *bool `json:"overwrite,omitempty" yaml:"overwrite,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` User *NodeUser `json:"user,omitempty" yaml:"user,omitempty"` }
type PXEManagerConfiguration ¶
type PXEManagerConfiguration struct { ConfigFile string UseInternalEtcdDiscovery bool EtcdQuorumSize int EtcdDiscoveryUrl string EtcdEndpoint string EtcdCAFile string DNSmasqExecutable string DNSmasqTemplate string TFTPRoot string NoTLS bool TLSCertFile string TLSKeyFile string APIPort int PXEPort int BindAddress string FileServerPath string StaticHTMLPath string TemplateSnippets string IgnitionConfig string ImagesCacheDir string FilesDir string Version string FlatcarAutologin bool ConsoleTTY bool SystemdShell bool Logger micrologger.Logger }
type Partition ¶
type Partition struct { GUID string `json:"guid,omitempty" yaml:"guid,omitempty"` Label string `json:"label,omitempty" yaml:"label,omitempty"` Number int `json:"number,omitempty" yaml:"number,omitempty"` Size int `json:"size,omitempty" yaml:"size,omitempty"` Start int `json:"start,omitempty" yaml:"start,omitempty"` TypeGUID string `json:"typeGuid,omitempty" yaml:"typeGUID,omitempty"` }
type Passwd ¶
type Passwd struct { Groups []PasswdGroup `json:"groups,omitempty" yaml:"groups,omitempty"` Users []PasswdUser `json:"users,omitempty" yaml:"users,omitempty"` }
type PasswdGroup ¶
type PasswdUser ¶
type PasswdUser struct { Create *Usercreate `json:"create,omitempty" yaml:"create,omitempty"` Gecos string `json:"gecos,omitempty" yaml:"gecos,omitempty"` Groups []Group `json:"groups,omitempty" yaml:"groups,omitempty"` HomeDir string `json:"homeDir,omitempty" yaml:"homeDir,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` NoCreateHome bool `json:"noCreateHome,omitempty" yaml:"noCreateHome,omitempty"` NoLogInit bool `json:"noLogInit,omitempty" yaml:"noLogInit,omitempty"` NoUserGroup bool `json:"noUserGroup,omitempty" yaml:"noUserGroup,omitempty"` PasswordHash *string `json:"passwordHash,omitempty" yaml:"passwordHash,omitempty"` PrimaryGroup string `json:"primaryGroup,omitempty" yaml:"primaryGroup,omitempty"` SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty" yaml:"sshAuthorizedKeys,omitempty"` Shell string `json:"shell,omitempty" yaml:"shell,omitempty"` System bool `json:"system,omitempty" yaml:"system,omitempty"` UID *int `json:"uid,omitempty" yaml:"uid,omitempty"` }
type Raid ¶
type Raid struct { Devices []Device `json:"devices,omitempty" yaml:"devices,omitempty"` Level string `json:"level,omitempty" yaml:"level,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Options []RaidOption `json:"options,omitempty" yaml:"options,omitempty"` Spares int `json:"spares,omitempty" yaml:"spares,omitempty"` }
type RaidOption ¶
type RaidOption string
type SSHAuthorizedKey ¶
type SSHAuthorizedKey string
type Storage ¶
type Storage struct { Directories []Directory `json:"directories,omitempty" yaml:"directories,omitempty"` Disks []Disk `json:"disks,omitempty" yaml:"disks,omitempty"` Files []File `json:"files,omitempty" yaml:"files,omitempty"` Filesystems []Filesystem `json:"filesystems,omitempty" yaml:"filesystems,omitempty"` Links []Link `json:"links,omitempty" yaml:"links,omitempty"` Raid []Raid `json:"raid,omitempty" yaml:"raid,omitempty"` }
type SystemdDropin ¶
type TLS ¶
type TLS struct {
CertificateAuthorities []CaReference `json:"certificateAuthorities,omitempty" yaml:"certificateAuthorities,omitempty"`
}
type Unit ¶
type Unit struct { Contents string `json:"contents,omitempty" yaml:"contents,omitempty"` Dropins []SystemdDropin `json:"dropins,omitempty" yaml:"dropins,omitempty"` Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"` Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` Mask bool `json:"mask,omitempty" yaml:"mask,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` }
type Usercreate ¶
type Usercreate struct { Gecos string `json:"gecos,omitempty" yaml:"gecos,omitempty"` Groups []UsercreateGroup `json:"groups,omitempty" yaml:"groups,omitempty"` HomeDir string `json:"homeDir,omitempty" yaml:"homeDir,omitempty"` NoCreateHome bool `json:"noCreateHome,omitempty" yaml:"noCreateHome,omitempty"` NoLogInit bool `json:"noLogInit,omitempty" yaml:"noLogInit,omitempty"` NoUserGroup bool `json:"noUserGroup,omitempty" yaml:"noUserGroup,omitempty"` PrimaryGroup string `json:"primaryGroup,omitempty" yaml:"primaryGroup,omitempty"` Shell string `json:"shell,omitempty" yaml:"shell,omitempty"` System bool `json:"system,omitempty" yaml:"system,omitempty"` UID *int `json:"uid,omitempty" yaml:"uid,omitempty"` }
type UsercreateGroup ¶
type UsercreateGroup string
type Verification ¶
type Verification struct {
Hash *string `json:"hash,omitempty" yaml:"hash,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.