api

package
v0.0.0-...-386b7fa Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAutoscalerCondition

type ClusterAutoscalerCondition struct {
	// Type defines the aspect that the condition describes. For example, it can be Health or ScaleUp/Down activity.
	Type ClusterAutoscalerConditionType `json:"type,omitempty"`
	// Status of the condition.
	Status ClusterAutoscalerConditionStatus `json:"status,omitempty"`
	// Message is a free text extra information about the condition. It may contain some
	// extra debugging data, like why the cluster is unhealthy.
	Message string `json:"message,omitempty"`
	// Reason is a unique, one-word, CamelCase reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// LastProbeTime is the last time we probed the condition.
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// LastTransitionTime is the time since when the condition was in the given state.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

ClusterAutoscalerCondition describes some aspect of ClusterAutoscaler work.

func GetConditionByType

func GetConditionByType(conditionType ClusterAutoscalerConditionType,
	conditions []ClusterAutoscalerCondition) *ClusterAutoscalerCondition

GetConditionByType gets condition by type.

type ClusterAutoscalerConditionStatus

type ClusterAutoscalerConditionStatus string

ClusterAutoscalerConditionStatus is a status of ClusterAutoscalerCondition.

const (

	// ClusterAutoscalerHealthy status means that the cluster is in a good shape.
	ClusterAutoscalerHealthy ClusterAutoscalerConditionStatus = "Healthy"
	// ClusterAutoscalerUnhealthy status means that the cluster is in a bad shape.
	ClusterAutoscalerUnhealthy ClusterAutoscalerConditionStatus = "Unhealthy"

	//ClusterAutoscalerCandidatesPresent status means that there are candidates for scale down.
	ClusterAutoscalerCandidatesPresent ClusterAutoscalerConditionStatus = "CandidatesPresent"
	//ClusterAutoscalerNoCandidates status means that there are no candidates for scale down.
	ClusterAutoscalerNoCandidates ClusterAutoscalerConditionStatus = "NoCandidates"

	// ClusterAutoscalerNeeded status means that scale up is needed.
	ClusterAutoscalerNeeded ClusterAutoscalerConditionStatus = "Needed"
	// ClusterAutoscalerNotNeeded status means that scale up is not needed.
	ClusterAutoscalerNotNeeded ClusterAutoscalerConditionStatus = "NotNeeded"
	// ClusterAutoscalerInProgress status means that scale up is in progress.
	ClusterAutoscalerInProgress ClusterAutoscalerConditionStatus = "InProgress"
	// ClusterAutoscalerNoActivity status means that there has been no scale up activity recently.
	ClusterAutoscalerNoActivity ClusterAutoscalerConditionStatus = "NoActivity"
	// ClusterAutoscalerBackoff status means that due to a recently failed scale-up no further scale-ups attempts will be made for some time.
	ClusterAutoscalerBackoff ClusterAutoscalerConditionStatus = "Backoff"
)

type ClusterAutoscalerConditionType

type ClusterAutoscalerConditionType string

ClusterAutoscalerConditionType is the type of ClusterAutoscalerCondition.

const (
	// ClusterAutoscalerHealth - is a condition that explains what is the current health
	// of ClusterAutoscaler or its node groups.
	ClusterAutoscalerHealth ClusterAutoscalerConditionType = "Health"
	// ClusterAutoscalerScaleDown is a condition that explains what is the current status
	// of a node group with regard to scale down activities.
	ClusterAutoscalerScaleDown ClusterAutoscalerConditionType = "ScaleDown"
	// ClusterAutoscalerScaleUp is a condition that explains what is the current status
	// of a node group with regard to scale up activities.
	ClusterAutoscalerScaleUp ClusterAutoscalerConditionType = "ScaleUp"
)

type ClusterAutoscalerStatus

type ClusterAutoscalerStatus struct {
	// NodeGroupStatuses contains status information of individual node groups on which CA works.
	NodeGroupStatuses []NodeGroupStatus `json:"nodeGroupStatuses,omitempty"`
	// ClusterwideConditions contains conditions that apply to the whole autoscaler.
	ClusterwideConditions []ClusterAutoscalerCondition `json:"clusterwideConditions,omitempty"`
}

ClusterAutoscalerStatus contains ClusterAutoscaler status.

func (ClusterAutoscalerStatus) GetReadableString

func (status ClusterAutoscalerStatus) GetReadableString() string

GetReadableString produces human-readable description of status.

type NodeGroupStatus

type NodeGroupStatus struct {
	// ProviderID is the cloud-provider-specific name of the node group. On GCE it will be equal
	// to MIG url, on AWS it will be ASG name, etc.
	ProviderID string `json:"providerID,omitempty"`
	// Conditions is a list of conditions that describe the state of the node group.
	Conditions []ClusterAutoscalerCondition `json:"conditions,omitempty"`
}

NodeGroupStatus contains status of a group of nodes controlled by ClusterAutoscaler.

Jump to

Keyboard shortcuts

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