Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_CONFIG_PATH = "/etc/kube-upgraded/config.yaml" DEFAULT_LOG_LEVEL = "info" DEFAULT_KUBECONFIG = "/etc/kubernetes/kubelet.conf" DEFAULT_STREAM = "ghcr.io/heathcliff26/fcos-k8s" DEFAULT_FLEETLOCK_GROUP = "default" DEFAULT_RPM_OSTREE_PATH = "/usr/bin/rpm-ostree" DEFAULT_KUBEADM_PATH = "/usr/bin/kubeadm" DEFAULT_CHECK_INTERVAL = 3 * time.Hour DEFAULT_RETRY_INTERVAL = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func NewErrUnknownLogLevel ¶
Types ¶
type Config ¶
type Config struct { // The log level used by slog, default "info" LogLevel string `yaml:"logLevel,omitempty"` // The path to the kubeconfig file, default is the kubelet config under "/etc/kubernetes/kubelet.conf" Kubeconfig string `yaml:"kubeconfig,omitempty"` // The container image repository for os rebases Stream string `yaml:"stream,omitempty"` // Configuration for fleetlock node locking Fleetlock FleetlockConfig `yaml:"fleetlock"` // The path to the rpm-ostree binary, default "/usr/bin/rpm-ostree" RPMOStreePath string `yaml:"rpm-ostree-path,omitempty"` // The path to the kubeadm binary, default "/usr/bin/kubeadm" KubeadmPath string `yaml:"kubeadm-path,omitempty"` // The interval between regular checks, default 3h CheckInterval time.Duration `yaml:"check-interval,omitempty"` // The interval between retries when an operation fails, default 5m RetryInterval time.Duration `yaml:"retry-interval,omitempty"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func LoadConfig ¶
Loads the config from the given path. When path is empty, it checks the default path "/etc/kube-upgraded/config.yaml". When no config is found in the default path, it returns the default config. Returns error when the given config is invalid.
type ErrUnknownLogLevel ¶
type ErrUnknownLogLevel struct {
// contains filtered or unexported fields
}
func (*ErrUnknownLogLevel) Error ¶
func (e *ErrUnknownLogLevel) Error() string
type FleetlockConfig ¶
Click to show internal directories.
Click to hide internal directories.