Documentation
¶
Index ¶
- func RunChecks(checks []Checker) error
- func RunMasterChecks(c *v1.Cluster, s ssh.Interface) error
- func RunNodeChecks(c *v1.Cluster, s ssh.Interface) error
- type CPUArchCeck
- type Checker
- type DirAvailableCheck
- type DirEmptyCheck
- type Error
- type FileAvailableCheck
- type FileContentCheck
- type InPathCheck
- type IsPrivilegedUserCheck
- type KernelCheck
- type KernelModuleCheck
- type KernelParameterCheck
- 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 ¶
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 DirEmptyCheck ¶ added in v1.8.0
DirEmptyCheck checks if the given directory either does not exist, or is empty.
func (DirEmptyCheck) Check ¶ added in v1.8.0
func (dmc DirEmptyCheck) Check() (warnings, errorList []error)
Check validates if a directory is empty.
func (DirEmptyCheck) Name ¶ added in v1.8.0
func (dmc DirEmptyCheck) Name() string
Name returns label for individual DirEmptyCheck. 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 KernelParameterCheck ¶ added in v1.7.0
Check the kernel version and kernel parameter for Cilium installation.
func (KernelParameterCheck) Check ¶ added in v1.7.0
func (kc KernelParameterCheck) Check() (warnings, errorList []error)
Check validates kernel version and parameter.
func (KernelParameterCheck) Name ¶ added in v1.7.0
func (kc KernelParameterCheck) Name() string
Name returns label for KernelCheck
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