v1alpha1

package
v0.0.0-...-5343e98 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains definitions of Vertical Pod Autoscaler related objects. +groupName=poc.autoscaling.k8s.io

Package v1alpha1 contains definitions of Vertical Pod Autoscaler related objects.

Index

Constants

View Source
const (
	// DefaultContainerResourcePolicy can be passed as
	// ContainerResourcePolicy.Name to specify the default policy.
	DefaultContainerResourcePolicy = "*"
)

Variables

View Source
var (
	// SchemeBuilder points to a list of functions added to Scheme.
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "poc.autoscaling.k8s.io", Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ContainerResourcePolicy

type ContainerResourcePolicy struct {
	// Name of the container or DefaultContainerResourcePolicy, in which
	// case the policy is used by the containers that don't have their own
	// policy specified.
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
	// Whether autoscaler is enabled for the container. Defaults to "On".
	// +optional
	Mode ContainerScalingMode `json:"mode,omitempty" protobuf:"bytes,2,opt,name=mode"`
	// Specifies the minimal amount of resources that will be recommended
	// for the container.
	// +optional
	MinAllowed apiv1.ResourceList `json:"minAllowed,omitempty" protobuf:"bytes,3,rep,name=minAllowed,casttype=ResourceList,castkey=ResourceName"`
	// Specifies the maximum amount of resources that will be recommended
	// for the container.
	// +optional
	MaxAllowed apiv1.ResourceList `json:"maxAllowed,omitempty" protobuf:"bytes,4,rep,name=maxAllowed,casttype=ResourceList,castkey=ResourceName"`
}

ContainerResourcePolicy controls how autoscaler computes the recommended resources for a specific container.

func (*ContainerResourcePolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerResourcePolicy.

func (*ContainerResourcePolicy) DeepCopyInto

func (in *ContainerResourcePolicy) DeepCopyInto(out *ContainerResourcePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerScalingMode

type ContainerScalingMode string

ContainerScalingMode controls whether autoscaler is enabled for a specific container.

const (
	// ContainerScalingModeOn means autoscaling is enabled for a container.
	ContainerScalingModeOn ContainerScalingMode = "On"
	// ContainerScalingModeOff means autoscaling is disabled for a container.
	ContainerScalingModeOff ContainerScalingMode = "Off"
)

type HistogramCheckpoint

type HistogramCheckpoint struct {
	// Reference timestamp for samples collected within this histogram.
	ReferenceTimestamp metav1.Time `json:"referenceTimestamp,omitempty" protobuf:"bytes,1,opt,name=referenceTimestamp"`

	// Map from bucket index to bucket weight.
	BucketWeights map[int]uint32 `json:"bucketWeights,omitempty" protobuf:"bytes,2,opt,name=bucketWeights"`

	// Sum of samples to be used as denominator for weights from BucketWeights.
	TotalWeight float64 `json:"totalWeight,omitempty" protobuf:"bytes,3,opt,name=totalWeight"`
}

HistogramCheckpoint contains data needed to reconstruct the histogram.

func (*HistogramCheckpoint) DeepCopy

func (in *HistogramCheckpoint) DeepCopy() *HistogramCheckpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistogramCheckpoint.

func (*HistogramCheckpoint) DeepCopyInto

func (in *HistogramCheckpoint) DeepCopyInto(out *HistogramCheckpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodResourcePolicy

type PodResourcePolicy struct {
	// Per-container resource policies.
	ContainerPolicies []ContainerResourcePolicy `json:"containerPolicies" protobuf:"bytes,1,rep,name=containerPolicies"`
}

PodResourcePolicy controls how autoscaler computes the recommended resources for containers belonging to the pod.

func (*PodResourcePolicy) DeepCopy

func (in *PodResourcePolicy) DeepCopy() *PodResourcePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourcePolicy.

func (*PodResourcePolicy) DeepCopyInto

func (in *PodResourcePolicy) DeepCopyInto(out *PodResourcePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodUpdatePolicy

type PodUpdatePolicy struct {
	// Controls when autoscaler applies changes to the pod resoures.
	// +optional
	UpdateMode UpdateMode `json:"updateMode,omitempty" protobuf:"bytes,1,opt,name=updateMode"`
}

PodUpdatePolicy describes the rules on how changes are applied to the pods.

func (*PodUpdatePolicy) DeepCopy

func (in *PodUpdatePolicy) DeepCopy() *PodUpdatePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodUpdatePolicy.

func (*PodUpdatePolicy) DeepCopyInto

func (in *PodUpdatePolicy) DeepCopyInto(out *PodUpdatePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RecommendedContainerResources

type RecommendedContainerResources struct {
	// Name of the container.
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
	// Recommended amount of resources.
	Target apiv1.ResourceList `json:"target,omitempty" protobuf:"bytes,2,rep,name=target,casttype=ResourceList,castkey=ResourceName"`
	// Minimum recommended amount of resources.
	// Running the application with less resources is likely to have
	// significant impact on performance/availability.
	// +optional
	MinRecommended apiv1.ResourceList `json:"minRecommended,omitempty" protobuf:"bytes,3,rep,name=minRecommended,casttype=ResourceList,castkey=ResourceName"`
	// Maximum recommended amount of resources.
	// Any resources allocated beyond this value are likely wasted.
	// +optional
	MaxRecommended apiv1.ResourceList `json:"maxRecommended,omitempty" protobuf:"bytes,3,rep,name=maxRecommended,casttype=ResourceList,castkey=ResourceName"`
}

RecommendedContainerResources is the recommendation of resources computed by autoscaler for a specific container. Respects the container resource policy if present in the spec.

func (*RecommendedContainerResources) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendedContainerResources.

func (*RecommendedContainerResources) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RecommendedPodResources

type RecommendedPodResources struct {
	// Resources recommended by the autoscaler for each container.
	ContainerRecommendations []RecommendedContainerResources `json:"containerRecommendations" protobuf:"bytes,1,rep,name=containerRecommendations"`
}

RecommendedPodResources is the recommendation of resources computed by autoscaler.

func (*RecommendedPodResources) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendedPodResources.

func (*RecommendedPodResources) DeepCopyInto

func (in *RecommendedPodResources) DeepCopyInto(out *RecommendedPodResources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpdateMode

type UpdateMode string

UpdateMode controls when autoscaler applies changes to the pod resoures.

const (
	// UpdateModeOff means that autoscaler never changes Pod resources.
	// The recommender still sets the recommended resources in the
	// VerticalPodAutoscaler object. This can be used for a "dry run".
	UpdateModeOff UpdateMode = "Off"
	// UpdateModeInitial means that autoscaler only assigns resources on pod
	// creation and does not change them during the lifetime of the pod.
	UpdateModeInitial UpdateMode = "Initial"
	// UpdateModeAuto means that autoscaler assigns resources on pod creation
	// and additionally can update them during the lifetime of the pod,
	// including evicting / rescheduling the pod.
	UpdateModeAuto UpdateMode = "Auto"
)

type VerticalPodAutoscaler

type VerticalPodAutoscaler struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Specification of the behavior of the autoscaler.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
	// +optional
	Spec VerticalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Current information about the autoscaler.
	// +optional
	Status VerticalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

VerticalPodAutoscaler is the configuration for a vertical pod autoscaler, which automatically manages pod resources based on historical and real time resource utilization.

func (*VerticalPodAutoscaler) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscaler.

func (*VerticalPodAutoscaler) DeepCopyInto

func (in *VerticalPodAutoscaler) DeepCopyInto(out *VerticalPodAutoscaler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VerticalPodAutoscaler) DeepCopyObject

func (in *VerticalPodAutoscaler) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VerticalPodAutoscalerCheckpoint

type VerticalPodAutoscalerCheckpoint struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Specification of the checkpoint.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
	// +optional
	Spec VerticalPodAutoscalerCheckpointSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Data of the checkpoint.
	// +optional
	Status VerticalPodAutoscalerCheckpointStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender's restart.

func (*VerticalPodAutoscalerCheckpoint) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerCheckpoint.

func (*VerticalPodAutoscalerCheckpoint) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VerticalPodAutoscalerCheckpoint) DeepCopyObject

func (in *VerticalPodAutoscalerCheckpoint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VerticalPodAutoscalerCheckpointList

type VerticalPodAutoscalerCheckpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []VerticalPodAutoscalerCheckpoint `json:"items"`
}

VerticalPodAutoscalerCheckpointList is a list of VerticalPodAutoscalerCheckpoint objects.

func (*VerticalPodAutoscalerCheckpointList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerCheckpointList.

func (*VerticalPodAutoscalerCheckpointList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VerticalPodAutoscalerCheckpointList) DeepCopyObject

func (in *VerticalPodAutoscalerCheckpointList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VerticalPodAutoscalerCheckpointSpec

type VerticalPodAutoscalerCheckpointSpec struct {
	// Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
	VPAObjectName string `json:"vpaObjectName,omitempty" protobuf:"bytes,1,opt,name=vpaObjectName"`

	// Name of the checkpointed container.
	ContainerName string `json:"containerName,omitempty" protobuf:"bytes,2,opt,name=containerName"`
}

VerticalPodAutoscalerCheckpointSpec is the specification of the checkpoint object.

func (*VerticalPodAutoscalerCheckpointSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerCheckpointSpec.

func (*VerticalPodAutoscalerCheckpointSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VerticalPodAutoscalerCheckpointStatus

type VerticalPodAutoscalerCheckpointStatus struct {
	// The time when the status was last refreshed.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,1,opt,name=lastUpdateTime"`

	// Version of the format of the stored data.
	Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"`

	// Checkpoint of histogram for consumption of CPU.
	CPUHistogram HistogramCheckpoint `json:"cpuHistogram,omitempty" protobuf:"bytes,3,rep,name=cpuHistograms"`

	// Checkpoint of histogram for consumption of memory.
	MemoryHistogram HistogramCheckpoint `json:"memoryHistogram,omitempty" protobuf:"bytes,4,rep,name=memoryHistogram"`

	// Timestamp of the fist sample from the histograms.
	FirstSampleStart metav1.Time `json:"firstSampleStart,omitempty" protobuf:"bytes,5,opt,name=firstSampleStart"`

	// Timestamp of the last sample from the histograms.
	LastSampleStart metav1.Time `json:"lastSampleStart,omitempty" protobuf:"bytes,6,opt,name=lastSampleStart"`

	// Total number of samples in the histograms.
	TotalSamplesCount int `json:"totalSamplesCount,omitempty" protobuf:"bytes,7,opt,name=totalSamplesCount"`
}

VerticalPodAutoscalerCheckpointStatus contains data of the checkpoint.

func (*VerticalPodAutoscalerCheckpointStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerCheckpointStatus.

func (*VerticalPodAutoscalerCheckpointStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VerticalPodAutoscalerCondition

type VerticalPodAutoscalerCondition struct {
	// type describes the current condition
	Type VerticalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
	// status is the status of the condition (True, False, Unknown)
	Status apiv1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
	// lastTransitionTime is the last time the condition transitioned from
	// one status to another
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
	// reason is the reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
	// message is a human-readable explanation containing details about
	// the transition
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
}

VerticalPodAutoscalerCondition describes the state of a VerticalPodAutoscaler at a certain point.

func (*VerticalPodAutoscalerCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerCondition.

func (*VerticalPodAutoscalerCondition) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VerticalPodAutoscalerConditionType

type VerticalPodAutoscalerConditionType string

VerticalPodAutoscalerConditionType are the valid conditions of a VerticalPodAutoscaler.

var (
	// Configured indicates whether the VPA recommender was able to load a valid VPA spec.
	Configured VerticalPodAutoscalerConditionType = "Configured"
	// RecommendationProvided indicates whether the VPA recommender was able to calculate a recommendation.
	RecommendationProvided VerticalPodAutoscalerConditionType = "RecommendationProvided"
)

type VerticalPodAutoscalerList

type VerticalPodAutoscalerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []VerticalPodAutoscaler `json:"items"`
}

VerticalPodAutoscalerList is a list of VerticalPodAutoscaler objects.

func (*VerticalPodAutoscalerList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerList.

func (*VerticalPodAutoscalerList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VerticalPodAutoscalerList) DeepCopyObject

func (in *VerticalPodAutoscalerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VerticalPodAutoscalerSpec

type VerticalPodAutoscalerSpec struct {
	// A label query that determines the set of pods controlled by the Autoscaler.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`

	// Describes the rules on how changes are applied to the pods.
	// +optional
	UpdatePolicy PodUpdatePolicy `json:"updatePolicy,omitempty" protobuf:"bytes,2,opt,name=updatePolicy"`

	// Controls how the autoscaler computes recommended resources.
	// +optional
	ResourcePolicy PodResourcePolicy `json:"resourcePolicy,omitempty" protobuf:"bytes,3,opt,name=resourcePolicy"`
}

VerticalPodAutoscalerSpec is the specification of the behavior of the autoscaler.

func (*VerticalPodAutoscalerSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerSpec.

func (*VerticalPodAutoscalerSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VerticalPodAutoscalerStatus

type VerticalPodAutoscalerStatus struct {
	// The time when the status was last refreshed.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,1,opt,name=lastUpdateTime"`
	// The most recently computed amount of resources recommended by the
	// autoscaler for the controlled pods.
	// +optional
	Recommendation RecommendedPodResources `json:"recommendation,omitempty" protobuf:"bytes,2,opt,name=recommendation"`

	// Conditions is the set of conditions required for this autoscaler to scale its target,
	// and indicates whether or not those conditions are met.
	Conditions []VerticalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,3,rep,name=conditions"`
}

VerticalPodAutoscalerStatus describes the runtime state of the autoscaler.

func (*VerticalPodAutoscalerStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalPodAutoscalerStatus.

func (*VerticalPodAutoscalerStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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