Documentation
¶
Index ¶
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 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 GetByTaint ¶ added in v0.33.0
GetByTaint will return a []Node of all nodes that have a matching taint
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