Documentation
¶
Index ¶
- Constants
- Variables
- func Export(prefix string, full bool) (string, error)
- func Get(key string) (interface{}, error)
- func KeysToStrings(item interface{}) interface{}
- func LoadRawConfig(prefix string, full bool) (map[interface{}]interface{}, []error)
- func Merge(bytes []byte) error
- func ReadConfigFile(file string) ([]byte, error)
- func ReadConfigFiles(bytes []byte, files ...string) (map[interface{}]interface{}, []error)
- func Set(key string, value interface{}) error
- func ValidateBytes(bytes []byte) (*gojsonschema.Result, error)
- func ValidateCfg(rawCfg interface{}) (*gojsonschema.Result, error)
- type CloudConfig
- type Command
- type DNSConfig
- type Defaults
- type File
- type InterfaceConfig
- type K3OSConfig
- type K3SConfig
- type NetworkConfig
- type ProxyConfig
- type SSHConfig
- type UpgradeConfig
Constants ¶
View Source
const ( OsConfigFile = "/etc/k3os-config.yml" CloudConfigDir = "/var/lib/rancher/k3os/conf/cloud-config.d" CloudConfigFile = "/var/lib/rancher/k3os/conf/cloud-config.yml" K3OSPasswordKey = "k3os.password" )
Variables ¶
View Source
var ( OSVersion string OSBuildDate string SSHUsers = []string{ "rancher", } Additional = []string{ "EXTRA_CMDLINE", } )
Functions ¶
func KeysToStrings ¶
func KeysToStrings(item interface{}) interface{}
func LoadRawConfig ¶
func ReadConfigFile ¶
func ReadConfigFiles ¶
func ValidateBytes ¶
func ValidateBytes(bytes []byte) (*gojsonschema.Result, error)
func ValidateCfg ¶
func ValidateCfg(rawCfg interface{}) (*gojsonschema.Result, error)
Types ¶
type CloudConfig ¶
type CloudConfig struct { Hostname string `yaml:"hostname,omitempty"` K3S K3SConfig `yaml:"k3s,omitempty"` K3OS K3OSConfig `yaml:"k3os,omitempty"` Runcmd []Command `yaml:"runcmd,omitempty"` WriteFiles []File `yaml:"write_files,omitempty"` }
func LoadConfig ¶
func LoadConfig(prefix string, terminate bool) *CloudConfig
type Command ¶
func (*Command) UnmarshalYAML ¶
type File ¶
type InterfaceConfig ¶
type K3OSConfig ¶
type K3OSConfig struct { Defaults Defaults `yaml:"defaults,omitempty"` Environment map[string]string `yaml:"environment,omitempty"` Modules []string `yaml:"modules,omitempty"` Network NetworkConfig `yaml:"network,omitempty"` SSH SSHConfig `yaml:"ssh,omitempty"` Sysctl map[string]string `yaml:"sysctl,omitempty"` Upgrade UpgradeConfig `yaml:"upgrade,omitempty"` Password string `yaml:"password,omitempty"` }
type NetworkConfig ¶
type NetworkConfig struct { DNS DNSConfig `yaml:"dns,omitempty"` Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"` Proxy ProxyConfig `yaml:"proxy,omitempty"` }
type ProxyConfig ¶
type UpgradeConfig ¶
Click to show internal directories.
Click to hide internal directories.