Documentation ¶
Index ¶
- func RunChecks(checks []Checker) error
- func RunMasterChecks(ctx *common.ClusterContext, s ssh.Interface) error
- func RunNodeChecks(s ssh.Interface) error
- type CPUArchCeck
- type Checker
- type DirAvailableCheck
- type Error
- type FileAvailableCheck
- type FileContentCheck
- type InPathCheck
- type IsPrivilegedUserCheck
- type KernelCheck
- type KernelModuleCheck
- type NumCPUCheck
- type PortOpenCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunChecks ¶
RunChecks runs each check, displays it's warnings/errors, and once all are processed will exit if any errors occurred.
func RunMasterChecks ¶
func RunMasterChecks(ctx *common.ClusterContext, s ssh.Interface) error
RunMasterChecks checks for master
Types ¶
type CPUArchCeck ¶
CPUArchCeck checks cpu arch
func (CPUArchCeck) Check ¶
func (cac CPUArchCeck) Check() (warnings, errorList []error)
Check checks cpu arch
type Checker ¶
Checker validates the state of the system to ensure kubeadm will be successful as often as possible.
type DirAvailableCheck ¶
DirAvailableCheck checks if the given directory either does not exist, or is empty.
func (DirAvailableCheck) Check ¶
func (dac DirAvailableCheck) Check() (warnings, errorList []error)
Check validates if a directory does not exist or empty.
func (DirAvailableCheck) Name ¶
func (dac DirAvailableCheck) Name() string
Name returns label for individual DirAvailableChecks. If not known, will return based on path.
type Error ¶
type Error struct {
Msg string
}
Error defines struct for communicating error messages generated by preflight checks
type FileAvailableCheck ¶
FileAvailableCheck checks that the given file does not already exist.
func (FileAvailableCheck) Check ¶
func (fac FileAvailableCheck) Check() (warnings, errorList []error)
Check validates if the given file does not already exist.
func (FileAvailableCheck) Name ¶
func (fac FileAvailableCheck) Name() string
Name returns label for individual FileAvailableChecks. If not known, will return based on path.
type FileContentCheck ¶
FileContentCheck checks that the given file contains the string Content.
func (FileContentCheck) Check ¶
func (fcc FileContentCheck) Check() (warnings, errorList []error)
Check validates if the given file contains the given content.
func (FileContentCheck) Name ¶
func (fcc FileContentCheck) Name() string
Name returns label for individual FileContentChecks. If not known, will return based on path.
type InPathCheck ¶
InPathCheck checks if the given executable is present in $PATH
func (InPathCheck) Check ¶
func (ipc InPathCheck) Check() (warnings, errs []error)
Check validates if the given executable is present in the path.
func (InPathCheck) Name ¶
func (ipc InPathCheck) Name() string
Name returns label for individual InPathCheck. If not known, will return based on path.
type IsPrivilegedUserCheck ¶
IsPrivilegedUserCheck verifies user is privileged (linux - root, windows - Administrator)
func (IsPrivilegedUserCheck) Check ¶
func (ipuc IsPrivilegedUserCheck) Check() (warnings, errorList []error)
Check validates if an user has elevated (root) privileges.
func (IsPrivilegedUserCheck) Name ¶
func (IsPrivilegedUserCheck) Name() string
Name returns name for IsPrivilegedUserCheck
type KernelCheck ¶
KernelCheck checks if kernel meet requires
func (KernelCheck) Check ¶
func (kc KernelCheck) Check() (warnings, errorList []error)
Check validates kernel version
type KernelModuleCheck ¶
KernelModuleCheck checks that the given kernel module wheather exists
func (KernelModuleCheck) Check ¶
func (kmc KernelModuleCheck) Check() (warnings, errorList []error)
Check validates if the given file does not already exist.
func (KernelModuleCheck) Name ¶
func (kmc KernelModuleCheck) Name() string
Name returns label for individual FileAvailableChecks. If not known, will return based on path.
type NumCPUCheck ¶
NumCPUCheck checks if current number of CPUs is not less than required
func (NumCPUCheck) Check ¶
func (ncc NumCPUCheck) Check() (warnings, errorList []error)
Check number of CPUs required by kubeadm
type PortOpenCheck ¶
PortOpenCheck ensures the given port is available for use.
func (PortOpenCheck) Check ¶
func (poc PortOpenCheck) Check() (warnings, errorList []error)
Check validates if the particular port is available.
func (PortOpenCheck) Name ¶
func (poc PortOpenCheck) Name() string
Name returns name for PortOpenCheck. If not known, will return "PortXXXX" based on port number