Documentation ¶
Index ¶
- func GetHostname(hostnameOverride string) (string, error)
- func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition)
- func ParseNodeIPAnnotation(nodeIP string) ([]net.IP, error)
- func ParseNodeIPArgument(nodeIP, cloudProvider string) ([]net.IP, []string, error)
- func PatchNodeCIDRs(ctx context.Context, c clientset.Interface, node types.NodeName, ...) 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶ added in v0.27.0
GetHostname returns OS's hostname if 'hostnameOverride' is empty; otherwise, it returns 'hostnameOverride'. In either case, the value is canonicalized (trimmed and lowercased).
func GetNodeCondition ¶
func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition)
GetNodeCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func ParseNodeIPAnnotation ¶ added in v0.27.0
ParseNodeIPAnnotation parses the `alpha.kubernetes.io/provided-node-ip` annotation, which can be either a single IP address or a comma-separated pair of IP addresses. Unlike with ParseNodeIPArgument, invalid values are considered an error.
func ParseNodeIPArgument ¶ added in v0.27.0
ParseNodeIPArgument parses kubelet's --node-ip argument. If nodeIP contains invalid values, they will be returned as strings. This is done also when an error is returned. The caller then can decide what to do with the invalid values. Dual-stack node IPs are allowed if cloudProvider is unset or `"external"`.
func PatchNodeCIDRs ¶
func PatchNodeCIDRs(ctx context.Context, c clientset.Interface, node types.NodeName, cidrs []string) error
PatchNodeCIDRs patches the specified node.CIDR=cidrs[0] and node.CIDRs to the given value.
func PatchNodeStatus ¶
func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, []byte, error)
PatchNodeStatus patches node status.
func SetNodeCondition ¶
SetNodeCondition updates specific node condition with patch operation.
Types ¶
This section is empty.