Documentation ¶
Index ¶
- Constants
- func AreAllReady() bool
- func AreNNodesReady(nodeCount int) bool
- func DescribeNodes()
- func WaitOnReady(nodeCount int, sleep, timeout time.Duration) bool
- type Address
- type Condition
- type GetNodesResult
- type Info
- type List
- type Metadata
- type Node
- func GetByAnnotations(key, value string) ([]Node, error)
- func GetByLabel(label string) ([]Node, error)
- func GetByRegex(regex string) ([]Node, error)
- func GetByRegexWithRetry(regex string, sleep, timeout time.Duration) ([]Node, error)
- func GetByTaint(key, value, effect string) ([]Node, error)
- func GetWithRetry(sleep, timeout time.Duration) ([]Node, error)
- type Spec
- type Status
- type Taint
Constants ¶
const (
//ServerVersion is used to parse out the version of the API running
ServerVersion = `(Server Version:\s)+(.*)`
)
Variables ¶
This section is empty.
Functions ¶
func AreNNodesReady ¶ added in v0.41.0
AreNNodesReady returns a bool depending on cluster state
Types ¶
type Condition ¶
type Condition struct { LastHeartbeatTime time.Time `json:"lastHeartbeatTime"` LastTransitionTime time.Time `json:"lastTransitionTime"` Message string `json:"message"` Reason string `json:"reason"` Status string `json:"status"` Type string `json:"type"` }
Condition contains various status information
type GetNodesResult ¶ added in v0.42.0
GetNodesResult is the result type for GetAllByPrefixAsync
func GetByRegexAsync ¶ added in v0.42.0
func GetByRegexAsync(regex string) GetNodesResult
GetByRegexAsync wraps GetByRegex with a struct response for goroutine + channel usage
func GetNodesAsync ¶ added in v0.42.0
func GetNodesAsync() GetNodesResult
GetNodesAsync wraps Get with a struct response for goroutine + channel usage
type Info ¶
type Info struct { ContainerRuntimeVersion string `json:"containerRuntimeVersion"` KubeProxyVersion string `json:"kubeProxyVersion"` KubeletVersion string `json:"kubeletVersion"` OperatingSystem string `json:"operatingSystem"` OSImage string `json:"osImage"` }
Info contains node information like what version the kubelet is running
type List ¶
type List struct {
Nodes []Node `json:"items"`
}
List is used to parse out Nodes from a list
type Metadata ¶
type Metadata struct { Name string `json:"name"` CreatedAt time.Time `json:"creationTimestamp"` Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations"` }
Metadata contains things like name and created at
type Node ¶
type Node struct { Status Status `json:"status"` Metadata Metadata `json:"metadata"` Spec Spec `json:"spec"` }
Node represents the kubernetes Node Resource
func GetByAnnotations ¶ added in v0.33.0
GetByAnnotations will return a []Node of all nodes that have a matching annotation
func GetByLabel ¶ added in v0.33.0
GetByLabel will return a []Node of all nodes that have a matching label
func GetByRegex ¶ added in v0.41.0
GetByRegex will return a []Node of all nodes that have a name that match the regular expression
func GetByRegexWithRetry ¶ added in v0.42.0
GetByRegexWithRetry gets nodes that match a regular expression, allowing for retries
func GetByTaint ¶ added in v0.33.0
GetByTaint will return a []Node of all nodes that have a matching taint
func GetWithRetry ¶ added in v0.42.0
GetWithRetry gets nodes, allowing for retries
func (*Node) HasSubstring ¶ added in v0.36.0
HasSubstring determines if a node name matches includes the passed in substring
type Spec ¶ added in v0.33.0
type Spec struct {
Taints []Taint `json:"taints"`
}
Spec contains things like taints
type Status ¶
type Status struct { NodeInfo Info `json:"nodeInfo"` NodeAddresses []Address `json:"addresses"` Conditions []Condition `json:"conditions"` }
Status parses information from the status key
func (*Status) GetAddressByType ¶
GetAddressByType will return the Address object for a given Kubernetes node