Documentation ¶
Index ¶
- Constants
- func GetHostname(hostnameOverride string) string
- func GetNodeHostIP(node *v1.Node) (net.IP, error)
- func GetPreferredNodeAddress(node *v1.Node, preferredAddressTypes []v1.NodeAddressType) (string, error)
- func GetZoneKey(node *v1.Node) string
- func InternalGetNodeHostIP(node *api.Node) (net.IP, error)
- func PatchNodeCIDR(c clientset.Interface, node types.NodeName, cidr string) error
- func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, ...) (*v1.Node, []byte, error)
- func SetNodeCondition(c clientset.Interface, node types.NodeName, condition v1.NodeCondition) error
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" )
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
GetHostname returns OS's hostname if 'hostnameOverride' is empty; otherwise, return 'hostnameOverride'.
func GetNodeHostIP ¶
GetNodeHostIP returns the provided node's IP, based on the priority: 1. NodeInternalIP 2. NodeExternalIP
func GetPreferredNodeAddress ¶ added in v1.5.0
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 ¶ added in v1.4.0
GetZoneKey is a helper function that builds a string identifier that is unique per failure-zone; it returns empty-string for no zone.
func InternalGetNodeHostIP ¶ added in v1.6.1
InternalGetNodeHostIP returns the provided node's IP, based on the priority: 1. NodeInternalIP 2. NodeExternalIP
func PatchNodeCIDR ¶ added in v1.9.1
PatchNodeCIDR patches the specified node's CIDR to the given value.
func PatchNodeStatus ¶ added in v1.6.1
func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, []byte, error)
PatchNodeStatus patches node status.
func SetNodeCondition ¶ added in v1.4.0
SetNodeCondition updates specific node condition with patch operation.
Types ¶
This section is empty.