Documentation ¶
Index ¶
- Constants
- Variables
- func Age(node *k8sCore.Node, now time.Time) time.Duration
- func AsNodeReferenceList(nodeList *k8sCore.NodeList) []*k8sCore.Node
- func ButNodeCreatedTimestamp(node *v1.Node, timestamp time.Time) *v1.Node
- func ButNodeDecommissioned(source string, node *v1.Node) *v1.Node
- func ButNodeLabel(node *v1.Node, key string, value string) *v1.Node
- func ButNodeRemovable(node *v1.Node) *v1.Node
- func ButNodeScalingDown(source string, node *v1.Node) *v1.Node
- func ButNodeWithTaint(node *v1.Node, taint *v1.Taint) *v1.Node
- func FindTaint(node *k8sCore.Node, taintKey string) *k8sCore.Taint
- func FormatNode(node *v1.Node, ageThreshold time.Duration, options poolUtil.FormatterOptions) string
- func FromNodeToComputeResource(node *k8sCore.Node) poolApi.ComputeResource
- func HasNoExecuteTaint(node *k8sCore.Node) bool
- func IsKubeletNode(node *k8sCore.Node) bool
- func IsNodeAvailableForScheduling(node *k8sCore.Node, now time.Time, ageThreshold time.Duration) bool
- func IsNodeBootstrapping(node *k8sCore.Node, now time.Time, ageThreshold time.Duration) bool
- func IsNodeBroken(node *k8sCore.Node) bool
- func IsNodeDecommissioned(node *k8sCore.Node) bool
- func IsNodeOnItsWayOut(node *k8sCore.Node) bool
- func IsNodeRemovable(node *k8sCore.Node) bool
- func IsNodeScalingDown(node *k8sCore.Node) bool
- func IsNodeTerminated(node *k8sCore.Node) bool
- func IsNodeToRemove(node *k8sCore.Node) bool
- func Names(nodes []*k8sCore.Node) []string
- func NewDecommissioningTaint(source string, now time.Time) *v1.Taint
- func NewNode(name string, resourcePoolName string, ...) *coreV1.Node
- func NewNodes(count int64, namePrefix string, resourcePoolName string, ...) []*coreV1.Node
- func NewRandomNode(transformers ...func(node *coreV1.Node)) *coreV1.Node
- func NewScalingDownTaint(source string, now time.Time) *v1.Taint
- func NewScalingDownTaintWithValue(now time.Time, value string) *v1.Taint
- func SortNodesByAge(nodes []*k8sCore.Node) []*k8sCore.Node
- func SumNodeResources(nodes []*k8sCore.Node) poolApi.ComputeResource
- func UniqueNodeState(node *k8sCore.Node, now time.Time, ageThreshold time.Duration) string
Constants ¶
View Source
const ( // Labels NodeLabelBackend = "node.titus.netflix.com/backend" // Backends NodeBackendKubelet = "kubelet" // Possible node states NodeStateBootstrapping = "bootstrapping" NodeStateActive = "active" NodeStateDecommissioned = "decommissioned" NodeStateScalingDown = "scalingDown" NodeStateBroken = "broken" NodeStateRemovable = "removable" )
View Source
const (
// TODO Use different resource pool name in tests
ResourcePoolElastic = "elastic"
)
Variables ¶
View Source
var NodeStatesAll = []string{ NodeStateBootstrapping, NodeStateActive, NodeStateDecommissioned, NodeStateScalingDown, NodeStateBroken, NodeStateRemovable, }
Functions ¶
func ButNodeCreatedTimestamp ¶ added in v0.8.0
func ButNodeDecommissioned ¶ added in v0.8.0
func ButNodeLabel ¶ added in v0.8.0
func ButNodeScalingDown ¶ added in v0.8.0
func ButNodeWithTaint ¶ added in v0.8.0
func FormatNode ¶ added in v0.8.0
func FromNodeToComputeResource ¶ added in v0.8.0
func FromNodeToComputeResource(node *k8sCore.Node) poolApi.ComputeResource
func HasNoExecuteTaint ¶ added in v0.8.0
func IsKubeletNode ¶ added in v0.6.0
Returns true, if a node is a Kubelet node
func IsNodeAvailableForScheduling ¶ added in v0.8.0
func IsNodeBootstrapping ¶ added in v0.8.0
Returns true for a new node that is still bootstrapping. `ageThreshold` is a time limit for a node to be regarded as new.
func IsNodeBroken ¶ added in v0.8.0
func IsNodeDecommissioned ¶ added in v0.8.0
func IsNodeOnItsWayOut ¶ added in v0.8.0
func IsNodeRemovable ¶ added in v0.8.0
func IsNodeScalingDown ¶ added in v0.8.0
func IsNodeTerminated ¶ added in v0.8.0
TODO There is no obvious way to determine if a node object corresponds to an existing node instance. We trust here that node GC or node graceful shutdown deal with it quickly enough.
func IsNodeToRemove ¶ added in v0.8.0
func NewDecommissioningTaint ¶ added in v0.8.0
func NewNode ¶ added in v0.8.0
func NewNode(name string, resourcePoolName string, machineTypeConfig *machineTypeV1.MachineTypeConfig) *coreV1.Node
func NewNodes ¶ added in v0.8.0
func NewNodes(count int64, namePrefix string, resourcePoolName string, machineTypeConfig *machineTypeV1.MachineTypeConfig) []*coreV1.Node
func NewRandomNode ¶ added in v0.8.0
func NewScalingDownTaint ¶ added in v0.8.0
func NewScalingDownTaintWithValue ¶ added in v0.8.0
func SortNodesByAge ¶ added in v0.8.0
Sort in place an array of nodes by the creation timestamp.
func SumNodeResources ¶ added in v0.8.0
func SumNodeResources(nodes []*k8sCore.Node) poolApi.ComputeResource
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.