package
1.0.0
Repository: https://github.com/lsutils/kind.git
Documentation: pkg.go.dev

# Functions

CollectLogs provides the common functionality to get various debug info from the node.
FileOnHost is a helper to create a file at path even if the parent directory doesn't exist in which case it will be created with ModePerm.
GetFreePort is a helper used to get a free TCP port on the host returns the free port and a cleanup function, the cleanup function must be called after all free ports have been determined to ensure the same port is not returned multiple times.
GetProxyEnvs returns a map of proxy environment variables to their values If proxy settings are set, NO_PROXY is modified to include the cluster subnets.
MakeNodeNamer returns a func(role string)(nodeName string) used to name nodes based on their role and the clusterName.
NodeReachedCgroupsReadyRegexp returns a regexp for use with WaitUntilLogRegexpMatches This is used to avoid "ERROR: this script needs /sys/fs/cgroup/cgroup.procs to be empty (for writing the top-level cgroup.subtree_control)" See https://github.com/kubernetes-sigs/kind/issues/2409 This pattern matches either "detected cgroupv1" from the kind node image's entrypoint logs or "Multi-User System" target if is using cgroups v2, so that `docker exec` can be executed safely without breaking cgroup v2 hierarchy.
PortOrGetFreePort is a helper that either returns the provided port if valid or returns a new free port on listenAddr and a cleanup function.
RequiredNodeImages returns the set of _node_ images specified by the config This does not include the loadbalancer image, and is only used to improve the UX by explicit pulling the node images prior to running.
WaitUntilLogRegexpMatches waits until logCmd output produces a line matching re.

# Constants

APIServerInternalPort defines the port where the control plane is listening _inside_ the node network.
HTTPProxy is the HTTP_PROXY environment variable key.
HTTPSProxy is the HTTPS_PROXY environment variable key.
NOProxy is the NO_PROXY environment variable key.