package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Packages
Package apiclient contains wrapping logic for Kubernetes API clients.
Package config contains utilities for managing the kubeadm configuration API.
Package pubkeypin provides primitives for x509 public key pinning in the style of RFC7469.
Package runtime provides the kubeadm container runtime implementation.
# Functions
ArgumentsFromCommand parses a CLI command in the form "--foo=bar" to an Arg slice.
ArgumentsToCommand takes two Arg slices, one with the base arguments and one with optional override arguments.
CheckErr prints a user friendly error to STDERR and exits with a non-zero exit code.
Chroot chroot()s to the new path.
CopyDir copies the content of a folder.
CopyFile copies a file from src to dest.
FormatErrMsg returns a human-readable string describing the slice of errors passed to the function.
GetControlPlaneEndpoint returns a properly formatted endpoint for the control plane built according following rules: - If the controlPlaneEndpoint is defined, use it.
GetLocalAPIEndpoint parses an APIEndpoint and returns it as a string, or returns and error in case it cannot be parsed.
GetProxyEnvVars builds a list of environment variables in order to use the right proxy.
GroupVersionKindsFromBytes parses the bytes and returns a gvk slice.
GroupVersionKindsHasClusterConfiguration returns whether the following gvk slice contains a ClusterConfiguration object.
GroupVersionKindsHasInitConfiguration returns whether the following gvk slice contains a InitConfiguration object.
GroupVersionKindsHasJoinConfiguration returns whether the following gvk slice contains a JoinConfiguration object.
GroupVersionKindsHasKind returns whether the following gvk slice contains the kind given as a parameter.
GroupVersionKindsHasResetConfiguration returns whether the following gvk slice contains a ResetConfiguration object.
GroupVersionKindsHasUpgradeConfiguration returns whether the following gvk slice contains a UpgradeConfiguration object.
KubernetesIsCIVersion checks if user requested CI version.
KubernetesVersionToImageTag is helper function that replaces all non-allowed symbols in tag strings with underscores.
MarshalToYaml marshals an object into yaml.
MarshalToYamlForCodecs marshals an object into yaml using the specified codec TODO: Is specifying the gv really needed here? TODO: Can we support json out of the box easily here?.
MergeKubeadmEnvVars merges values of environment variable slices.
MoveFile moves a file from src to dest.
ParseHostPort parses a network address of the form "host:port", "ipv4:port", "[ipv6]:port" into host and port; ":port" can be eventually omitted.
ParsePort parses a string representing a TCP port.
ParseTemplate validates and parses passed as argument template.
SplitYAMLDocuments reads the YAML bytes per-document, unmarshals the TypeMeta information from each document and returns a map between the GroupVersionKind of the document and the document bytes.
StartTimeUTC returns startTime with its location set to UTC.
UniversalUnmarshal unmarshals YAML or JSON into a runtime.Object using the universal deserializer.
# Constants
DefaultErrorExitCode defines exit the code for failed action generally.
PreFlightExitCode defines exit the code for preflight checks.
ValidationExitCode defines the exit code validation checks.
# Variables
ErrExit is an error returned when kubeadm is about to exit.
KubernetesReleaseVersion during unit tests equals kubernetesReleaseVersionTest and returns a static placeholder version.