Documentation ¶
Index ¶
- Variables
- func IsKnownProvider(value string) bool
- func MemoryToInt(nodeMemory *resource.Quantity) int64
- func NodeAttachableVolumesCount(nodeStatus v1.ResourceList) int64
- func NodeHasCondition(conditions []v1.NodeCondition, s v1.ConditionStatus, t v1.NodeConditionType) bool
- func NodeHostname(addresses []v1.NodeAddress) string
- func NodeIP(addresses []v1.NodeAddress) string
- func NodeRole(node v1.Node) string
- func NodeVersion(nodes []v1alpha1.StatusClusterNode, name string) string
- func NodeWorkerVolumeSize(workers []host.Worker) int64
- type Health
- type LifecycleState
Constants ¶
This section is empty.
Variables ¶
var Providers = [...]string{"aws", "azure", "kvm"}
Providers is an array of providers which are currently implemented for health checking
Functions ¶
func IsKnownProvider ¶
IsKnownProvider is a helper function returning true iff the given value is in Providers
func MemoryToInt ¶
MemoryToInt returns the memory resource as an integer or 0 if conversion fails.
func NodeAttachableVolumesCount ¶
func NodeAttachableVolumesCount(nodeStatus v1.ResourceList) int64
NodeAttachableVolumesCount counts the total number of attachable volumes in the ResourceList
func NodeHasCondition ¶
func NodeHasCondition(conditions []v1.NodeCondition, s v1.ConditionStatus, t v1.NodeConditionType) bool
NodeHasCondition returns true if the node conditions contains a condition of the given type and value.
func NodeHostname ¶
func NodeHostname(addresses []v1.NodeAddress) string
NodeHostname returns the value of the hostname address for a node.
func NodeIP ¶
func NodeIP(addresses []v1.NodeAddress) string
NodeIP returns the value of the IP address for a node.
func NodeVersion ¶
func NodeVersion(nodes []v1alpha1.StatusClusterNode, name string) string
NodeVersion returns the version of a node from an array of StatusClusterNode.
func NodeWorkerVolumeSize ¶
NodeWorkerVolumeSize returns the first volume size found in a slice of Workers, or 0 if the list is empty.
Types ¶
type Health ¶
type Health string
Health is an enumeration of colors which represent the overall health of a resource
const ( // HealthRed represents an unhealthy cluster HealthRed Health = "red" // HealthYellow represents a passable cluster HealthYellow Health = "yellow" // HealthGreen represents a healthy cluster HealthGreen Health = "green" // HealthDefault is used when a condition cannot otherwise be determined HealthDefault Health = HealthGreen )
type LifecycleState ¶
type LifecycleState string
LifecycleState is an enumeration of states correspoding to certain cluster conditions
const ( // StateNormal cluster state represents a cluster which is not creating, upgrading, or deleting StateNormal LifecycleState = "normal" // StateCreating cluster state represents a cluster which is still being created StateCreating LifecycleState = "creating" // StateUpgrading cluster state represents a cluster which is still being upgraded StateUpgrading LifecycleState = "upgrading" // StateDeleting cluster state represents a cluster which is still being deleting StateDeleting LifecycleState = "deleting" )