kubernetesk8s.io/kubernetes/pkg/util/node Index | Files

package node

import "k8s.io/kubernetes/pkg/util/node"

Index

Constants

const (
	// The reason and message set on a pod when its state cannot be confirmed as kubelet is unresponsive
	// on the node it is (was) running.
	NodeUnreachablePodReason  = "NodeLost"
	NodeUnreachablePodMessage = "Node %v which was running pod %v is unresponsive"
)

Functions

func GetHostname

func GetHostname(hostnameOverride string) string

func GetNodeHostIP

func GetNodeHostIP(node *v1.Node) (net.IP, error)

GetNodeHostIP returns the provided node's IP, based on the priority: 1. NodeInternalIP 2. NodeExternalIP 3. NodeLegacyHostIP

func GetPreferredNodeAddress

func GetPreferredNodeAddress(node *v1.Node, preferredAddressTypes []v1.NodeAddressType) (string, error)

GetPreferredNodeAddress returns the address of the provided node, using the provided preference order. If none of the preferred address types are found, an error is returned.

func GetZoneKey

func GetZoneKey(node *v1.Node) string

Helper function that builds a string identifier that is unique per failure-zone Returns empty-string for no zone

func InternalGetNodeHostIP

func InternalGetNodeHostIP(node *api.Node) (net.IP, error)

InternalGetNodeHostIP returns the provided node's IP, based on the priority: 1. NodeInternalIP 2. NodeExternalIP 3. NodeLegacyHostIP

func PatchNodeStatus

func PatchNodeStatus(c clientset.Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, error)

PatchNodeStatus patches node status.

func SetNodeCondition

func SetNodeCondition(c clientset.Interface, node types.NodeName, condition v1.NodeCondition) error

SetNodeCondition updates specific node condition with patch operation.

Source Files

node.go

Version
v1.6.0-rc.1
Published
Mar 24, 2017
Platform
js/wasm
Imports
13 packages
Last checked
2 minutes ago

Tools for package owners.