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_RPM_OSTREE_PATH = "/usr/bin/rpm-ostree" DEFAULT_KUBEADM_PATH = "/usr/bin/kubeadm" )
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 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"` }
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
Click to show internal directories.
Click to hide internal directories.