Documentation ¶
Index ¶
- Constants
- func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String) error
- func RunConvertClusterChecks(cliSet *kubernetes.Clientset, ignorePreflightErrors sets.String) error
- func RunConvertNodeChecks(o KubePathOperator, ignorePreflightErrors sets.String, deployTunnel bool) error
- func RunNodeServantJobCheck(cliSet *kubernetes.Clientset, jobLst []*batchv1.Job, ...) error
- func RunPullImagesCheck(o ImageOperator, ignorePreflightErrors sets.String) error
- func RunRootCheckOnly(ignorePreflightErrors sets.String) error
- type Checker
- type DirExistingCheck
- type Error
- type FileAtLeastOneExistingCheck
- type FileExistingCheck
- type ImageOperator
- type ImagePullCheck
- type IsPrivilegedUserCheck
- type JobExistCheck
- type KubePathOperator
- type NodeEdgeWorkerLabelCheck
- type NodeReadyCheck
- type NodeServantJobCheck
- type PortOpenCheck
Constants ¶
const ( KubernetesDir = "/etc/kubernetes" KubeletPkiDir = "/var/lib/kubelet/pki" YurtHubProxySecurePort = 10268 YurtHubProxyPort = 10261 YurtHubPort = 10267 YurttunnelAgentPort = 10266 )
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 RunConvertClusterChecks ¶
func RunConvertClusterChecks(cliSet *kubernetes.Clientset, ignorePreflightErrors sets.String) error
RunConvertClusterChecks excutes all cluster-level checks.
func RunConvertNodeChecks ¶
func RunConvertNodeChecks(o KubePathOperator, ignorePreflightErrors sets.String, deployTunnel bool) error
func RunNodeServantJobCheck ¶
func RunNodeServantJobCheck( cliSet *kubernetes.Clientset, jobLst []*batchv1.Job, waitServantJobTimeout time.Duration, checkServantJobPeriod time.Duration, ignorePreflightErrors sets.String) error
RunNodeServantJobCheck runs preflight-check job for each node.
func RunPullImagesCheck ¶
func RunPullImagesCheck(o ImageOperator, ignorePreflightErrors sets.String) error
RunPullImagesCheck will pull images convert needs if they are not found on the system
func RunRootCheckOnly ¶
RunRootCheckOnly initializes checks slice of structs and call RunChecks
Types ¶
type Checker ¶
Checker validates the state of the system to ensure kubeadm will be successful as often as possible.
type DirExistingCheck ¶
DirExistingCheck checks if the given directory either exist, or is not empty.
func (DirExistingCheck) Check ¶
func (dac DirExistingCheck) Check() (warnings, errorList []error)
Check validates if a directory exists or does not empty.
func (DirExistingCheck) Name ¶
func (dac DirExistingCheck) Name() string
Name returns label for individual DirExistingChecks. 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-convert-convert checks
type FileAtLeastOneExistingCheck ¶
FileAtLeastOneExistingCheck checks if at least one file exists in the file list. After a file is found, the remaining files will not be checked.
func (FileAtLeastOneExistingCheck) Check ¶
func (foc FileAtLeastOneExistingCheck) Check() (warnings, errorList []error)
func (FileAtLeastOneExistingCheck) Name ¶
func (foc FileAtLeastOneExistingCheck) Name() string
type FileExistingCheck ¶
FileExistingCheck checks that the given file already exist.
func (FileExistingCheck) Check ¶
func (fac FileExistingCheck) Check() (warnings, errorList []error)
func (FileExistingCheck) Name ¶
func (fac FileExistingCheck) Name() string
Name returns label for individual FileExistingChecks. If not known, will return based on path.
type ImageOperator ¶
type ImageOperator interface { GetCRISocket() string GetImageList() []string GetImagePullPolicy() v1.PullPolicy }
type ImagePullCheck ¶
type ImagePullCheck struct {
// contains filtered or unexported fields
}
ImagePullCheck will pull container images used by node-servant
func (ImagePullCheck) Check ¶
func (ipc ImagePullCheck) Check() (warnings, errorList []error)
func (ImagePullCheck) Name ¶
func (ImagePullCheck) Name() string
type IsPrivilegedUserCheck ¶
type IsPrivilegedUserCheck struct{}
IsPrivilegedUserCheck verifies user is privileged (linux - root). The check under windows environment has not been implemented yet.
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
type JobExistCheck ¶
JobExistCheck checks whether the jobs with a specific prefix exist.
func (JobExistCheck) Check ¶
func (jc JobExistCheck) Check() (warnings, errorList []error)
func (JobExistCheck) Name ¶
func (jc JobExistCheck) Name() string
type KubePathOperator ¶
type NodeEdgeWorkerLabelCheck ¶
NodeEdgeWorkerLabelCheck checks whether the node contains edgeWorker label which represents an OpenYurt node.
func (NodeEdgeWorkerLabelCheck) Check ¶
func (nlc NodeEdgeWorkerLabelCheck) Check() (warnings, errorList []error)
func (NodeEdgeWorkerLabelCheck) Name ¶
func (NodeEdgeWorkerLabelCheck) Name() string
type NodeReadyCheck ¶
NodeReadyCheck checks the nodes status whether is ready.
func (NodeReadyCheck) Check ¶
func (nrc NodeReadyCheck) Check() (warnings, errorList []error)
func (NodeReadyCheck) Name ¶
func (NodeReadyCheck) Name() string
type NodeServantJobCheck ¶
type NodeServantJobCheck struct {
// contains filtered or unexported fields
}
NodeServantJobCheck create jobs to do preflight checks. After the job is successfully executed, it will be deleted. The failed job will not be deleted, and the user needs to delete it manually.
func (NodeServantJobCheck) Check ¶
func (nc NodeServantJobCheck) Check() (warnings []error, errorList []error)
func (NodeServantJobCheck) Name ¶
func (NodeServantJobCheck) Name() string
type PortOpenCheck ¶
type PortOpenCheck struct {
// contains filtered or unexported fields
}
PortOpenCheck ensures the given port is available for use.
func (PortOpenCheck) Check ¶
func (poc PortOpenCheck) Check() (warnings, errorList []error)
func (PortOpenCheck) Name ¶
func (poc PortOpenCheck) Name() string