Documentation
¶
Index ¶
- func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error)
- func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String) error
- func RunInitMasterChecks(execer utilsexec.Interface, cfg *kubeadmapi.MasterConfiguration, ...) error
- func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.NodeConfiguration, ...) error
- func RunRootCheckOnly(ignorePreflightErrors sets.String) error
- func TryStartKubelet(ignorePreflightErrors sets.String)
- type CRICheck
- type Checker
- type DirAvailableCheck
- type Error
- type ExternalEtcdVersionCheck
- type ExtraArgsCheck
- type FileAvailableCheck
- type FileContentCheck
- type FileExistingCheck
- type FirewalldCheck
- type HTTPProxyCIDRCheck
- type HTTPProxyCheck
- type HostnameCheck
- type InPathCheck
- type IsPrivilegedUserCheck
- type KubeletVersionCheck
- type KubernetesVersionCheck
- type PortOpenCheck
- type ServiceCheck
- type SwapCheck
- type SystemVerificationCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeletVersion ¶ added in v1.9.0
func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error)
GetKubeletVersion is helper function that returns version of kubelet available in $PATH
func RunChecks ¶ added in v1.6.0
func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String) error
RunChecks runs each check, displays it's warnings/errors, and once all are processed will exit if any errors occurred.
func RunInitMasterChecks ¶
func RunInitMasterChecks(execer utilsexec.Interface, cfg *kubeadmapi.MasterConfiguration, ignorePreflightErrors sets.String) error
RunInitMasterChecks executes all individual, applicable to Master node checks.
func RunJoinNodeChecks ¶
func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.NodeConfiguration, ignorePreflightErrors sets.String) error
RunJoinNodeChecks executes all individual, applicable to node checks.
func RunRootCheckOnly ¶ added in v1.6.0
func RunRootCheckOnly(ignorePreflightErrors sets.String) error
RunRootCheckOnly initializes checks slice of structs and call RunChecks
func TryStartKubelet ¶ added in v1.6.0
func TryStartKubelet(ignorePreflightErrors sets.String)
TryStartKubelet attempts to bring up kubelet service
Types ¶
type CRICheck ¶ added in v1.9.0
type CRICheck struct {
// contains filtered or unexported fields
}
CRICheck verifies the container runtime through the CRI.
type Checker ¶ added in v1.6.0
type Checker interface {
Check() (warnings, errors []error)
Name() string
}
Checker validates the state of the system to ensure kubeadm will be successful as often as possible.
type DirAvailableCheck ¶
type DirAvailableCheck struct {
Path string
Label string
}
DirAvailableCheck checks if the given directory either does not exist, or is empty.
type Error ¶ added in v1.6.0
type Error struct {
Msg string
}
Error defines struct for communicating error messages generated by preflight checks
type ExternalEtcdVersionCheck ¶ added in v1.6.0
type ExternalEtcdVersionCheck struct {
Etcd kubeadmapi.Etcd
}
ExternalEtcdVersionCheck checks if version of external etcd meets the demand of kubeadm
type ExtraArgsCheck ¶ added in v1.8.0
type ExtraArgsCheck struct {
APIServerExtraArgs map[string]string
ControllerManagerExtraArgs map[string]string
SchedulerExtraArgs map[string]string
}
ExtraArgsCheck checks if arguments are valid.
type FileAvailableCheck ¶
type FileAvailableCheck struct {
Path string
Label string
}
FileAvailableCheck checks that the given file does not already exist.
type FileContentCheck ¶ added in v1.6.0
type FileContentCheck struct {
Path string
Content []byte
Label string
}
FileContentCheck checks that the given file contains the string Content.
type FileExistingCheck ¶ added in v1.6.0
type FileExistingCheck struct {
Path string
Label string
}
FileExistingCheck checks that the given file does not already exist.
type FirewalldCheck ¶ added in v1.6.0
type FirewalldCheck struct {
// contains filtered or unexported fields
}
FirewalldCheck checks if firewalld is enabled or active. If it is, warn the user that there may be problems if no actions are taken.
type HTTPProxyCIDRCheck ¶ added in v1.9.0
type HTTPProxyCIDRCheck struct {
Proto string
CIDR string
}
HTTPProxyCIDRCheck checks if https connection to specific subnet is going to be done directly or over proxy. If proxy detected, it will return warning. Similar to HTTPProxyCheck above, but operates with subnets and uses API machinery transport defaults to simulate kube-apiserver accessing cluster services and pods.
type HTTPProxyCheck ¶ added in v1.6.0
type HTTPProxyCheck struct {
Proto string
Host string
}
HTTPProxyCheck checks if https connection to specific host is going to be done directly or over proxy. If proxy detected, it will return warning.
type HostnameCheck ¶
type HostnameCheck struct {
// contains filtered or unexported fields
}
HostnameCheck checks if hostname match dns sub domain regex. If hostname doesn't match this regex, kubelet will not launch static pods like kube-apiserver/kube-controller-manager and so on.
type InPathCheck ¶
type InPathCheck struct {
// contains filtered or unexported fields
}
InPathCheck checks if the given executable is present in $PATH
type IsPrivilegedUserCheck ¶ added in v1.9.0
type IsPrivilegedUserCheck struct{}
IsPrivilegedUserCheck verifies user is privileged (linux - root, windows - Administrator)
type KubeletVersionCheck ¶ added in v1.9.0
type KubeletVersionCheck struct {
KubernetesVersion string
// contains filtered or unexported fields
}
KubeletVersionCheck validates installed kubelet version
type KubernetesVersionCheck ¶ added in v1.8.0
type KubernetesVersionCheck struct {
KubeadmVersion string
KubernetesVersion string
}
KubernetesVersionCheck validates kubernetes and kubeadm versions
type PortOpenCheck ¶
type PortOpenCheck struct {
// contains filtered or unexported fields
}
PortOpenCheck ensures the given port is available for use.
type ServiceCheck ¶
type ServiceCheck struct {
Service string
CheckIfActive bool
Label string
}
ServiceCheck verifies that the given service is enabled and active. If we do not detect a supported init system however, all checks are skipped and a warning is returned.
type SwapCheck ¶ added in v1.8.0
type SwapCheck struct{}
SwapCheck warns if swap is enabled
type SystemVerificationCheck ¶ added in v1.6.0
type SystemVerificationCheck struct {
CRISocket string
}
SystemVerificationCheck defines struct used for for running the system verification node check in test/e2e_node/system