Documentation ¶
Index ¶
- Constants
- func AddStageAfterInstallChroot(llmosCfg string, cfg *Config) (*yipSchema.Stage, error)
- func ConvertToCosStages(cfg *Config, afterInstall yipSchema.Stage) (*yipSchema.YipConfig, error)
- func EncodeToMap(obj interface{}) (map[string]interface{}, error)
- func GetLocalLLMOSConfig(path string) ([]byte, error)
- func GetRemoteLLMOSConfig(url string) ([]byte, error)
- func Render(template string, context interface{}) (*bytes.Buffer, error)
- func RenderTemplate(tpl string, context interface{}) (*bytes.Buffer, error)
- func ToEnv(prefix string, obj interface{}) ([]string, error)
- func ToYAMLKey(str string) string
- type Config
- func (c *Config) DeepCopy() (*Config, error)
- func (c *Config) GetK3sDisabledComponents() []string
- func (c *Config) GetK3sNodeExternalIP() string
- func (c *Config) GetK3sNodeLabels() []string
- func (c *Config) HasDataPartition() bool
- func (c *Config) Merge(cfg *Config) error
- func (c *Config) ToCosInstallEnv() ([]string, error)
- type File
- type Install
- type K3SConfig
- type LLMOS
- type Upgrade
Constants ¶
View Source
const ( K3sConfigDir = "/etc/rancher/k3s/config.yaml.d" K3sManifestPath = "/var/lib/rancher/k3s/server/manifests/" InitramfsStage = "initramfs" RootfsStage = "rootfs" NetworkBeforeStage = "network.before" NetworkAfterStage = "network.after" AfterInstallChrootStage = "after-install-chroot" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToCosStages ¶
ConvertToCosStages converts Config into the cOS stage configurations
func EncodeToMap ¶
func GetLocalLLMOSConfig ¶
func GetRemoteLLMOSConfig ¶
Types ¶
type Config ¶
type Config struct { // +optional, specify llmos os configurations OS LLMOS `json:"os,omitempty" yaml:"os,omitempty"` // +optional, specify llmos install configurations Install Install `json:"install,omitempty" yaml:"install,omitempty"` // +optional, specify llmos config file location (file path or http URL) ConfigURL string `json:"config-url,omitempty" yaml:"config-url,omitempty"` // +optional, specify the configuration version Version string `json:"version" yaml:"version"` // +optional, specify if the configuration is for debug purposes Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"` }
func LoadLLMOSConfig ¶
func NewLLMOSConfig ¶
func NewLLMOSConfig() *Config
func ReadLLMOSConfigFile ¶
func (*Config) GetK3sDisabledComponents ¶
func (*Config) GetK3sNodeExternalIP ¶
func (*Config) GetK3sNodeLabels ¶
func (*Config) HasDataPartition ¶
func (*Config) ToCosInstallEnv ¶
type Install ¶
type Install struct { Device string `json:"device" yaml:"device" binding:"required"` Silent bool `json:"silent,omitempty" yaml:"silent,omitempty"` ISOUrl string `json:"iso,omitempty" yaml:"iso,omitempty"` SystemURI string `json:"system-uri,omitempty" yaml:"system-uri,omitempty"` PowerOff bool `json:"poweroff,omitempty" yaml:"poweroff,omitempty"` Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"` TTY string `json:"tty,omitempty" yaml:"tty,omitempty"` DataDevice string `json:"data-device,omitempty" yaml:"data-device,omitempty"` Env []string `json:"env,omitempty" yaml:"env,omitempty"` Reboot bool `json:"reboot,omitempty" yaml:"reboot,omitempty"` ConfigDir string `json:"config-dir,omitempty" yaml:"config-dir,omitempty"` }
type LLMOS ¶
type LLMOS struct { SSHAuthorizedKeys []string `json:"ssh-authorized-keys,omitempty" yaml:"ssh-authorized-keys,omitempty"` WriteFiles []File `json:"write-files,omitempty" yaml:"write-files,omitempty"` Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` Modules []string `json:"modules,omitempty" yaml:"modules,omitempty"` Sysctl map[string]string `json:"sysctl,omitempty" yaml:"sysctl,omitempty"` Username string `json:"username,omitempty" yaml:"username,omitempty"` Password string `json:"password,omitempty" yaml:"password,omitempty"` NTPServers []string `json:"ntp-servers,omitempty" yaml:"ntp-servers,omitempty"` DNSNameservers []string `json:"dns-nameservers,omitempty" yaml:"dns-nameservers,omitempty"` Environment map[string]string `json:"environment,omitempty" yaml:"environment,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` PersistentStatePaths []string `json:"persistent-state-paths,omitempty" yaml:"persistent-state-paths,omitempty"` K3SConfig `json:",inline,omitempty" yaml:",inline,omitempty"` }
type Upgrade ¶
type Upgrade struct { Source string `json:"source,omitempty" yaml:"source,omitempty"` UpgradeRecovery bool `json:"upgrade-recovery,omitempty" yaml:"upgrade-recovery,omitempty"` HostDir string `json:"host-dir,omitempty" yaml:"host-dir,omitempty"` Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"` Force bool `json:"force,omitempty" yaml:"force,omitempty"` Dev bool `json:"dev,omitempty" yaml:"dev,omitempty"` }
Click to show internal directories.
Click to hide internal directories.