key

package
v0.0.0-...-4762671 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Providers = [...]string{"aws", "azure", "kvm"}

Providers is an array of providers which are currently implemented for health checking

Functions

func IsKnownProvider

func IsKnownProvider(value string) bool

IsKnownProvider is a helper function returning true iff the given value is in Providers

func MemoryToInt

func MemoryToInt(nodeMemory *resource.Quantity) int64

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 NodeRole

func NodeRole(node v1.Node) string

NodeRole returns the role of a node by parsing its labels.

func NodeVersion

func NodeVersion(nodes []v1alpha1.StatusClusterNode, name string) string

NodeVersion returns the version of a node from an array of StatusClusterNode.

func NodeWorkerVolumeSize

func NodeWorkerVolumeSize(workers []host.Worker) int64

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL