kubernetes/cmd/kubeadm/app/preflight/checks.go

const ipv4Forward

const ipv6DefaultForwarding

const externalEtcdRequestTimeout

const externalEtcdRequestRetries

const externalEtcdRequestInterval

var minExternalEtcdVersion

type Error

// Error implements the standard error interface
func (e *Error) Error() string {}

// Preflight identifies this error as a preflight error
func (e *Error) Preflight() bool {}

type Checker

type ContainerRuntimeCheck

// Name returns label for RuntimeCheck.
func (ContainerRuntimeCheck) Name() string {}

// Check validates the container runtime
func (crc ContainerRuntimeCheck) Check() (warnings, errorList []error) {}

type ServiceCheck

// Name returns label for ServiceCheck. If not provided, will return based on the service parameter
func (sc ServiceCheck) Name() string {}

// Check validates if the service is enabled and active.
func (sc ServiceCheck) Check() (warnings, errorList []error) {}

type FirewalldCheck

// Name returns label for FirewalldCheck.
func (FirewalldCheck) Name() string {}

// Check validates if the firewall is enabled and active.
func (fc FirewalldCheck) Check() (warnings, errorList []error) {}

type PortOpenCheck

// Name returns name for PortOpenCheck. If not known, will return "PortXXXX" based on port number
func (poc PortOpenCheck) Name() string {}

// Check validates if the particular port is available.
func (poc PortOpenCheck) Check() (warnings, errorList []error) {}

type IsPrivilegedUserCheck

// Name returns name for IsPrivilegedUserCheck
func (IsPrivilegedUserCheck) Name() string {}

type DirAvailableCheck

// Name returns label for individual DirAvailableChecks. If not known, will return based on path.
func (dac DirAvailableCheck) Name() string {}

// Check validates if a directory does not exist or empty.
func (dac DirAvailableCheck) Check() (warnings, errorList []error) {}

type FileAvailableCheck

// Name returns label for individual FileAvailableChecks. If not known, will return based on path.
func (fac FileAvailableCheck) Name() string {}

// Check validates if the given file does not already exist.
func (fac FileAvailableCheck) Check() (warnings, errorList []error) {}

type FileExistingCheck

// Name returns label for individual FileExistingChecks. If not known, will return based on path.
func (fac FileExistingCheck) Name() string {}

// Check validates if the given file already exists.
func (fac FileExistingCheck) Check() (warnings, errorList []error) {}

type FileContentCheck

// Name returns label for individual FileContentChecks. If not known, will return based on path.
func (fcc FileContentCheck) Name() string {}

// Check validates if the given file contains the given content.
func (fcc FileContentCheck) Check() (warnings, errorList []error) {}

type InPathCheck

// Name returns label for individual InPathCheck. If not known, will return based on path.
func (ipc InPathCheck) Name() string {}

// Check validates if the given executable is present in the path.
func (ipc InPathCheck) Check() (warnings, errs []error) {}

type HostnameCheck

// Name will return Hostname as name for HostnameCheck
func (HostnameCheck) Name() string {}

// Check validates if hostname match dns subdomain regex.
// Check hostname length and format
func (hc HostnameCheck) Check() (warnings, errorList []error) {}

type HTTPProxyCheck

// Name returns HTTPProxy as name for HTTPProxyCheck
func (hst HTTPProxyCheck) Name() string {}

// Check validates http connectivity type, direct or via proxy.
func (hst HTTPProxyCheck) Check() (warnings, errorList []error) {}

type HTTPProxyCIDRCheck

// Name will return HTTPProxyCIDR as name for HTTPProxyCIDRCheck
func (HTTPProxyCIDRCheck) Name() string {}

// Check validates http connectivity to first IP address in the CIDR.
// If it is not directly connected and goes via proxy it will produce warning.
func (subnet HTTPProxyCIDRCheck) Check() (warnings, errorList []error) {}

type SystemVerificationCheck

// Name will return SystemVerification as name for SystemVerificationCheck
func (SystemVerificationCheck) Name() string {}

// Check runs all individual checks
func (sysver SystemVerificationCheck) Check() (warnings, errorList []error) {}

type KubernetesVersionCheck

// Name will return KubernetesVersion as name for KubernetesVersionCheck
func (KubernetesVersionCheck) Name() string {}

// Check validates Kubernetes and kubeadm versions
func (kubever KubernetesVersionCheck) Check() (warnings, errorList []error) {}

type KubeletVersionCheck

// Name will return KubeletVersion as name for KubeletVersionCheck
func (KubeletVersionCheck) Name() string {}

// Check validates kubelet version. It should be not less than minimal supported version
func (kubever KubeletVersionCheck) Check() (warnings, errorList []error) {}

type SwapCheck

// Name will return Swap as name for SwapCheck
func (SwapCheck) Name() string {}

// Check validates whether swap is enabled or not
func (swc SwapCheck) Check() (warnings, errorList []error) {}

type etcdVersionResponse

type ExternalEtcdVersionCheck

// Name will return ExternalEtcdVersion as name for ExternalEtcdVersionCheck
func (ExternalEtcdVersionCheck) Name() string {}

// Check validates external etcd version
// TODO: Use the official etcd Golang client for this instead?
func (evc ExternalEtcdVersionCheck) Check() (warnings, errorList []error) {}

// configRootCAs configures and returns a reference to tls.Config instance if CAFile is provided
func (evc ExternalEtcdVersionCheck) configRootCAs(config *tls.Config) (*tls.Config, error) {}

// configCertAndKey configures and returns a reference to tls.Config instance if CertFile and KeyFile pair is provided
func (evc ExternalEtcdVersionCheck) configCertAndKey(config *tls.Config) (*tls.Config, error) {}

func (evc ExternalEtcdVersionCheck) getHTTPClient(config *tls.Config) *http.Client {}

func getEtcdVersionResponse(client *http.Client, url string, target interface{}

type ImagePullCheck

// Name returns the label for ImagePullCheck
func (ImagePullCheck) Name() string {}

// Check pulls images required by kubeadm. This is a mutating check
func (ipc ImagePullCheck) Check() (warnings, errorList []error) {}

type NumCPUCheck

// Name returns the label for NumCPUCheck
func (NumCPUCheck) Name() string {}

// Check number of CPUs required by kubeadm
func (ncc NumCPUCheck) Check() (warnings, errorList []error) {}

type MemCheck

// Name returns the label for memory
func (MemCheck) Name() string {}

// InitNodeChecks returns checks specific to "kubeadm init"
func InitNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.InitConfiguration, ignorePreflightErrors sets.Set[string], isSecondaryControlPlane bool, downloadCerts bool) ([]Checker, error) {}

// RunInitNodeChecks executes all individual, applicable to control-plane node checks.
// The boolean flag 'isSecondaryControlPlane' controls whether we are running checks in a --join-control-plane scenario.
// The boolean flag 'downloadCerts' controls whether we should skip checks on certificates because we are downloading them.
// If the flag is set to true we should skip checks already executed by RunJoinNodeChecks.
func RunInitNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.InitConfiguration, ignorePreflightErrors sets.Set[string], isSecondaryControlPlane bool, downloadCerts bool) error {}

// JoinNodeChecks returns checks specific to "kubeadm join"
func JoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.JoinConfiguration, ignorePreflightErrors sets.Set[string]) ([]Checker, error) {}

// RunJoinNodeChecks executes all individual, applicable to node checks.
func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.JoinConfiguration, ignorePreflightErrors sets.Set[string]) error {}

// addCommonChecks is a helper function to duplicate checks that are common between both the
// kubeadm init and join commands
func addCommonChecks(execer utilsexec.Interface, k8sVersion string, nodeReg *kubeadmapi.NodeRegistrationOptions, checks []Checker) []Checker {}

// RunRootCheckOnly initializes checks slice of structs and call RunChecks
func RunRootCheckOnly(ignorePreflightErrors sets.Set[string]) error {}

// RunPullImagesCheck will pull images kubeadm needs if they are not found on the system
func RunPullImagesCheck(execer utilsexec.Interface, cfg *kubeadmapi.InitConfiguration, ignorePreflightErrors sets.Set[string]) error {}

// RunChecks runs each check, displays its warnings/errors, and once all
// are processed will exit if any errors occurred.
func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.Set[string]) error {}

// setHasItemOrAll is helper function that return true if item is present in the set (case-insensitive) or special key 'all' is present
func setHasItemOrAll(s sets.Set[string], item string) bool {}

// normalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object.
// It takes a URL string as input.
func normalizeURLString(s string) (string, error) {}