Documentation ¶
Overview ¶
Package nodeutils contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
Index ¶
- func APIServerEndpointNode(allNodes []nodes.Node) (nodes.Node, error)
- func BootstrapControlPlaneNode(allNodes []nodes.Node) (nodes.Node, error)
- func ControlPlaneNodes(allNodes []nodes.Node) ([]nodes.Node, error)
- func CopyNodeToNode(a, b nodes.Node, file string) error
- func ExternalLoadBalancerNode(allNodes []nodes.Node) (nodes.Node, error)
- func ImageID(n nodes.Node, image string) (string, error)
- func ImageTags(n nodes.Node, imageID string) (map[string]bool, error)
- func InternalNodes(allNodes []nodes.Node) ([]nodes.Node, error)
- func KubeVersion(n nodes.Node) (version string, err error)
- func LoadImageArchive(n nodes.Node, image io.Reader) error
- func ReTagImage(n nodes.Node, imageID, imageName string) error
- func SecondaryControlPlaneNodes(allNodes []nodes.Node) ([]nodes.Node, error)
- func SelectNodesByRole(allNodes []nodes.Node, role string) ([]nodes.Node, error)
- func WriteFile(n nodes.Node, dest, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIServerEndpointNode ¶
APIServerEndpointNode selects the node from allNodes which hosts the API Server endpoint This should be the control plane node if there is one control plane node, or a LoadBalancer otherwise. It returns an error if the node list is invalid (E.G. two control planes and no load balancer)
func BootstrapControlPlaneNode ¶
BootstrapControlPlaneNode returns a handle to the bootstrap control plane node TODO(bentheelder): remove this. This node shouldn't be special (fix that first)
func ControlPlaneNodes ¶
ControlPlaneNodes returns all control plane nodes such that the first entry is the bootstrap control plane node
func CopyNodeToNode ¶
CopyNodeToNode copies file from a to b
func ExternalLoadBalancerNode ¶
ExternalLoadBalancerNode returns a node handle for the external control plane loadbalancer node or nil if there isn't one
func ImageTags ¶ added in v0.15.0
ImageTags is used to perform a reverse lookup of the ImageID to list set of available RepoTags corresponding to the ImageID in question
func InternalNodes ¶ added in v0.9.0
InternalNodes returns the list of container IDs for the "nodes" in the cluster that are ~Kubernetes nodes, as opposed to e.g. the external loadbalancer for HA
func KubeVersion ¶
KubeVersion returns the Kubernetes version installed on the node
func LoadImageArchive ¶
LoadImageArchive loads image onto the node, where image is a Reader over an image archive
func ReTagImage ¶ added in v0.15.0
ReTagImage is used to tag an ImageID with a custom tag specified by imageName parameter
func SecondaryControlPlaneNodes ¶
SecondaryControlPlaneNodes returns handles to the secondary control plane nodes and NOT the bootstrap control plane node
func SelectNodesByRole ¶
SelectNodesByRole returns a list of nodes with the matching role TODO(bentheelder): remove this in favor of specific role select methods and avoid the unnecessary error handling
Types ¶
This section is empty.