kind: Index | Files

package nodeutils

import ""

Package nodeutils contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from


Package Files

doc.go roles.go util.go

func APIServerEndpointNode Uses

func APIServerEndpointNode(allNodes []nodes.Node) (nodes.Node, error)

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 Uses

func BootstrapControlPlaneNode(allNodes []nodes.Node) (nodes.Node, error)

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 Uses

func ControlPlaneNodes(allNodes []nodes.Node) ([]nodes.Node, error)

ControlPlaneNodes returns all control plane nodes such that the first entry is the bootstrap control plane node

func CopyNodeToNode Uses

func CopyNodeToNode(a, b nodes.Node, file string) error

CopyNodeToNode copies file from a to b

func ExternalLoadBalancerNode Uses

func ExternalLoadBalancerNode(allNodes []nodes.Node) (nodes.Node, error)

ExternalLoadBalancerNode returns a node handle for the external control plane loadbalancer node or nil if there isn't one

func ImageID Uses

func ImageID(n nodes.Node, image string) (string, error)

ImageID returns ID of image on the node with the given image name if present

func InternalNodes Uses

func InternalNodes(allNodes []nodes.Node) ([]nodes.Node, error)

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 Uses

func KubeVersion(n nodes.Node) (version string, err error)

KubeVersion returns the Kubernetes version installed on the node

func LoadImageArchive Uses

func LoadImageArchive(n nodes.Node, image io.Reader) error

LoadImageArchive loads image onto the node, where image is a Reader over an image archive

func SecondaryControlPlaneNodes Uses

func SecondaryControlPlaneNodes(allNodes []nodes.Node) ([]nodes.Node, error)

SecondaryControlPlaneNodes returns handles to the secondary control plane nodes and NOT the bootstrap control plane node

func SelectNodesByRole Uses

func SelectNodesByRole(allNodes []nodes.Node, role string) ([]nodes.Node, error)

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

func WriteFile Uses

func WriteFile(n nodes.Node, dest, content string) error

WriteFile writes content to dest on the node

Package nodeutils imports 10 packages (graph) and is imported by 17 packages. Updated 2020-07-06. Refresh now. Tools for package owners.