v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Overview

Package v1alpha1 provides alpha API for Katalyst Autoscaling API objects.

Index

Constants

View Source
const (
	ResourceNameKatalystVPA       = "katalystverticalpodautoscalers"
	ResourceNameVPARecommendation = "verticalpodautoscalerrecommendations"
)

ResourceName const is used to construct standard gvr

View Source
const (
	// GroupName is the group name used in this package
	GroupName string = "autoscaling.katalyst.kubewharf.io"
)

Variables

View Source
var (
	// SchemeBuilder collects schemas to build.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is used by generated client to add this scheme to the generated client.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, 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 AlgorithmGranularity

type AlgorithmGranularity string

AlgorithmGranularity decide which granularity of recommended result +kubebuilder:validation:Enum=Default;Pod

const (
	// AlgorithmGranularityDefault means every pod has the same recommendation
	AlgorithmGranularityDefault AlgorithmGranularity = "Default"
	// AlgorithmGranularityPod means different pods have different recommendation
	AlgorithmGranularityPod AlgorithmGranularity = "Pod"
)

type AlgorithmPolicy

type AlgorithmPolicy struct {
	// Recommenders of the Algorithm used to this Pod;
	// if end-user wants to define their own recommendation algorithms,
	// they should manage this field to match their recommend implementations.
	// +optional
	Recommender string `json:"recommender,omitempty"`

	// Granularity of the Algorithm server recommendation result
	// The default is 'Default'.
	// +kubebuilder:default:=Default
	Granularity AlgorithmGranularity `json:"granularity"`

	// Extensions config by key-value format.
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	Extensions *runtime.RawExtension `json:"extensions,omitempty"`
}

func (*AlgorithmPolicy) DeepCopy

func (in *AlgorithmPolicy) DeepCopy() *AlgorithmPolicy

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

func (*AlgorithmPolicy) DeepCopyInto

func (in *AlgorithmPolicy) DeepCopyInto(out *AlgorithmPolicy)

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

type ContainerControlledValues

type ContainerControlledValues string

ContainerControlledValues controls which resource value should be autoscaled. +kubebuilder:validation:Enum=RequestsAndLimits;RequestsOnly;LimitsOnly

const (
	// ContainerControlledValuesRequestsAndLimits means resource request and limits
	// are scaled automatically. The limit is scaled proportionally to the request.
	ContainerControlledValuesRequestsAndLimits ContainerControlledValues = "RequestsAndLimits"
	// ContainerControlledValuesRequestsOnly means only requested resource is autoscaled.
	ContainerControlledValuesRequestsOnly ContainerControlledValues = "RequestsOnly"
	// ContainerControlledValuesLimitsOnly means only requested resource is autoscaled.
	ContainerControlledValuesLimitsOnly ContainerControlledValues = "LimitsOnly"
)

type ContainerResourceList

type ContainerResourceList struct {
	// Current indicates the real resource configuration from the view of CRI interface.
	// +optional
	Current v1.ResourceList `json:"current,omitempty"`
	// Recommended amount of resources. Observes ContainerResourcePolicy.
	// +optional
	Target v1.ResourceList `json:"target,omitempty"`
	// The most recent recommended resources target computed by the autoscaler
	// for the controlled pods, based only on actual resource usage, not taking
	// into account the ContainerResourcePolicy.
	// May differ from the Recommendation if the actual resource usage causes
	// the target to violate the ContainerResourcePolicy (lower than MinAllowed
	// or higher that MaxAllowed).
	// Used only as status indication, will not affect actual resource assignment.
	// +optional
	UncappedTarget v1.ResourceList `json:"uncappedTarget,omitempty"`
	// Minimum recommended amount of resources. Observes ContainerResourcePolicy.
	// This amount is not guaranteed to be sufficient for the application to operate in a stable way, however
	// running with less resources is likely to have significant impact on performance/availability.
	// +optional
	LowerBound v1.ResourceList `json:"lowerBound,omitempty"`
	// Maximum recommended amount of resources. Observes ContainerResourcePolicy.
	// Any resources allocated beyond this value are likely wasted. This value may be larger than the maximum
	// amount of application is actually capable of consuming.
	// +optional
	UpperBound v1.ResourceList `json:"upperBound,omitempty"`
}

ContainerResourceList is used to represent the resourceLists

func (*ContainerResourceList) DeepCopy

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

func (*ContainerResourceList) DeepCopyInto

func (in *ContainerResourceList) DeepCopyInto(out *ContainerResourceList)

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

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.
	ContainerName *string `json:"containerName"`

	// Specifies the minimal amount of resources that will be recommended
	// for the container. The default is no minimum.
	// +optional
	MinAllowed v1.ResourceList `json:"minAllowed,omitempty"`

	// Specifies the maximum amount of resources that will be recommended
	// for the container. The default is no maximum.
	// +optional
	MaxAllowed v1.ResourceList `json:"maxAllowed,omitempty"`

	// Specifies the type of recommendations that will be computed
	// (and possibly applied) by VPA.
	// If not specified, the default of [ResourceCPU] will be used.
	// +kubebuilder:default:={cpu}
	ControlledResources []v1.ResourceName `json:"controlledResources,omitempty" patchStrategy:"merge"`

	// Specifies which resource values should be controlled.
	// The default is "RequestsAndLimits".
	// +kubebuilder:default:=RequestsAndLimits
	ControlledValues ContainerControlledValues `json:"controlledValues"`

	// ResourceResizePolicy specifies how Kubernetes should handle resource resize.
	// The default is "None"
	// +kubebuilder:default:=None
	ResourceResizePolicy ResourceResizePolicy `json:"resourceResizePolicy"`
}

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 ContainerResources

type ContainerResources struct {
	// Name of the container.
	ContainerName *string `json:"containerName,omitempty"`
	// Requests indicates the recommendation resources for requests of this container
	// +optional
	Requests *ContainerResourceList `json:"requests,omitempty"`
	// Limits indicates the recommendation resources for limits of this container
	// +optional
	Limits *ContainerResourceList `json:"limits,omitempty"`
}

ContainerResources is the recommendation of resources computed by autoscaler for a specific container. Respects the container resource policy if present in the spec. In particular the recommendation is not produced for containers with `ContainerScalingMode` set to 'Off'.

func (*ContainerResources) DeepCopy

func (in *ContainerResources) DeepCopy() *ContainerResources

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

func (*ContainerResources) DeepCopyInto

func (in *ContainerResources) DeepCopyInto(out *ContainerResources)

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

type CrossVersionObjectReference

type CrossVersionObjectReference struct {
	// Kind of the referent
	Kind string `json:"kind"`
	// Name of the referent
	Name string `json:"name"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

CrossVersionObjectReference contains enough information to let you identify the referred resource. +structType=atomic

func (*CrossVersionObjectReference) DeepCopy

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

func (*CrossVersionObjectReference) DeepCopyInto

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

type KatalystVerticalPodAutoscaler

type KatalystVerticalPodAutoscaler struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a KatalystVerticalPodAutoscaler.
	// +optional
	Spec KatalystVerticalPodAutoscalerSpec `json:"spec,omitempty"`

	// Status represents the current information about a KatalystVerticalPodAutoscaler.
	// +optional
	Status KatalystVerticalPodAutoscalerStatus `json:"status,omitempty"`
}

KatalystVerticalPodAutoscaler captures information about a VPA object

func (*KatalystVerticalPodAutoscaler) DeepCopy

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

func (*KatalystVerticalPodAutoscaler) DeepCopyInto

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

func (*KatalystVerticalPodAutoscaler) DeepCopyObject

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

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

type KatalystVerticalPodAutoscalerList

type KatalystVerticalPodAutoscalerList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// items is the list of CNRs
	Items []KatalystVerticalPodAutoscaler `json:"items"`
}

KatalystVerticalPodAutoscalerList is a collection of CNR objects.

func (*KatalystVerticalPodAutoscalerList) DeepCopy

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

func (*KatalystVerticalPodAutoscalerList) DeepCopyInto

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

func (*KatalystVerticalPodAutoscalerList) DeepCopyObject

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

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

type KatalystVerticalPodAutoscalerSpec

type KatalystVerticalPodAutoscalerSpec struct {
	// TargetRef points to the controller managing the set of pods for the
	// autoscaler to control - e.g. Deployment, StatefulSet.
	TargetRef CrossVersionObjectReference `json:"targetRef"`

	// Describes the rules on how changes are applied to the pods.
	// If not specified, all fields in the `PodUpdatePolicy` are set to their default values.
	// +optional
	UpdatePolicy PodUpdatePolicy `json:"updatePolicy,omitempty"`

	// Controls how the autoscaler computes recommended resources.
	// The resource policy may be used to set constraints on the recommendations
	// for individual containers. If not specified, the autoscaler computes recommended
	// resources for all containers in the pod, without additional constraints.
	// +optional
	ResourcePolicy PodResourcePolicy `json:"resourcePolicy,omitempty"`
}

KatalystVerticalPodAutoscalerSpec is the specification of the behavior of the autoscaler.

func (*KatalystVerticalPodAutoscalerSpec) DeepCopy

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

func (*KatalystVerticalPodAutoscalerSpec) DeepCopyInto

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

type KatalystVerticalPodAutoscalerStatus

type KatalystVerticalPodAutoscalerStatus struct {
	// The most recently computed amount of resources provided by the
	// autoscaler for the controlled pods.
	// +optional
	PodResources []PodResources `json:"podResources,omitempty"`

	// ContainerResources is the most recently computed amount of resources for the controlled containers
	// it will be overwritten by PodResources
	// +optional
	ContainerResources []ContainerResources `json:"containerResources,omitempty"`

	// Conditions is the set of conditions required for this autoscaler to scale its target,
	// and indicates whether those conditions are met.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []VerticalPodAutoscalerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

KatalystVerticalPodAutoscalerStatus describes the runtime state of the autoscaler.

func (*KatalystVerticalPodAutoscalerStatus) DeepCopy

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

func (*KatalystVerticalPodAutoscalerStatus) DeepCopyInto

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

type PodApplyStrategy

type PodApplyStrategy string

PodApplyStrategy controls the applying scope autoscaler should obey to. +kubebuilder:validation:Enum=Pod;Group

const (
	// PodApplyStrategyStrategyPod means that autoscaler consider each pod as individual one,
	// the applied status (successes or failed) would affect each other pod.
	PodApplyStrategyStrategyPod PodApplyStrategy = "Pod"
	// PodApplyStrategyStrategyGroup means that autoscaler must make sure the recommendation for pods
	// can be applied before it performs updating actions.
	PodApplyStrategyStrategyGroup PodApplyStrategy = "Group"
)

type PodMatchingStrategy

type PodMatchingStrategy string

PodMatchingStrategy controls the timing autoscaler applies changes to the pod resources. +kubebuilder:validation:Enum=PodMatchingStrategyForHistoricalPod;PodMatchingStrategyForFreshPod;All

const (
	// PodMatchingStrategyForHistoricalPod means that autoscaler will only apply resources
	// for pods that are created before this VPA CR.
	PodMatchingStrategyForHistoricalPod PodMatchingStrategy = "ForHistoricalPod"
	// PodMatchingStrategyForFreshPod means that autoscaler assigns resources on pod
	// creation and also change them during the lifetime of the pod. Pods that are created before
	// this VPA CR won't be changed.
	PodMatchingStrategyForFreshPod PodMatchingStrategy = "ForFreshPod"
	// PodMatchingStrategyAll means that autoscaler will reconcile and update all pods
	// that match up with the target reference.
	PodMatchingStrategyAll PodMatchingStrategy = "All"
)

type PodResourcePolicy

type PodResourcePolicy struct {
	// policy of algorithm, if no algorithm is provided, using default
	// in-tree recommendation logic instead.
	// +optional
	AlgorithmPolicy AlgorithmPolicy `json:"algorithmPolicy,omitempty"`

	// Per-container resource policies.
	// +optional
	// +patchMergeKey=containerName
	// +patchStrategy=merge
	ContainerPolicies []ContainerResourcePolicy `json:"containerPolicies,omitempty" patchStrategy:"merge" patchMergeKey:"containerName"`
}

PodResourcePolicy controls how autoscaler computes the recommended resources for containers belonging to the pod. There can be at most one entry for every named container.

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 PodResources

type PodResources struct {
	// Name of the pod.
	PodName *string `json:"podName,omitempty"`
	// Resources recommended by the autoscaler for each container.
	ContainerResources []ContainerResources `json:"containerRecommendations,omitempty"`
}

func (*PodResources) DeepCopy

func (in *PodResources) DeepCopy() *PodResources

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

func (*PodResources) DeepCopyInto

func (in *PodResources) DeepCopyInto(out *PodResources)

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

type PodUpdatePolicy

type PodUpdatePolicy struct {
	// PodUpdatingStrategy controls the method autoscaler applies changes to the pod resources.
	// The default is 'Off'.
	// +kubebuilder:default:=Off
	PodUpdatingStrategy PodUpdatingStrategy `json:"podUpdatingStrategy,omitempty"`

	// PodMatchingStrategy controls the timing autoscaler applies changes to the pod resources.
	// The default is 'All'.
	// +kubebuilder:default:=All
	PodMatchingStrategy PodMatchingStrategy `json:"podMatchingStrategy,omitempty"`

	// PodApplyStrategy controls the applying scope autoscaler should obey to.
	// The default is 'Group'.
	// +kubebuilder:default:=Group
	PodApplyStrategy PodApplyStrategy `json:"podApplyStrategy,omitempty"`
}

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 PodUpdatingStrategy

type PodUpdatingStrategy string

PodUpdatingStrategy controls the method autoscaler applies changes to the pod resources. +kubebuilder:validation:Enum=Off;Recreate;Inplace;BestEffortInplace

const (
	// PodUpdatingStrategyOff means that autoscaler never changes Pod resources.
	// The provider still sets the resources in the KatalystVerticalPodAutoscaler object.
	// This can be used for a "dry run".
	PodUpdatingStrategyOff PodUpdatingStrategy = "Off"

	// PodUpdatingStrategyRecreate means that autoscaler assigns resources on pod
	// creation and additionally can update them during the lifetime of the
	// pod by always deleting and recreating the pod.
	PodUpdatingStrategyRecreate PodUpdatingStrategy = "Recreate"

	// PodUpdatingStrategyInplace means that autoscaler assigns resources only
	// during the lifetime of pod without re-creating the pod
	PodUpdatingStrategyInplace PodUpdatingStrategy = "Inplace"

	// PodUpdatingStrategyBestEffortInplace means that autoscaler will try to inplace
	// update resources, and fallback to recreate if not available.
	PodUpdatingStrategyBestEffortInplace PodUpdatingStrategy = "BestEffortInplace"
)

type RecommendedContainerResources

type RecommendedContainerResources struct {
	// Name of the container.
	ContainerName *string `json:"containerName"`
	// Requests indicates the recommendation resources for requests of this container
	// +optional
	Requests *RecommendedRequestResources `json:"requests,omitempty"`
	// Limits indicates the recommendation resources for limits of this container
	// +optional
	Limits *RecommendedRequestResources `json:"limits,omitempty"`
}

RecommendedContainerResources is the recommendation of resources computed by autoscaler for a specific container. Respects the container resource policy if present in the spec. In particular the recommendation is not produced for containers with `ContainerScalingMode` set to 'Off'.

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 {
	// Name of the pod.
	PodName *string `json:"podName"`
	// Resources recommended by the autoscaler for each container.
	// +optional
	ContainerRecommendations []RecommendedContainerResources `json:"containerRecommendations,omitempty"`
}

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 RecommendedRequestResources

type RecommendedRequestResources struct {
	// Resources indicates the recommended resources in quantity format.
	Resources v1.ResourceList `json:"resources,omitempty"`
}

RecommendedRequestResources is used to represent the resourceLists

func (*RecommendedRequestResources) DeepCopy

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

func (*RecommendedRequestResources) DeepCopyInto

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

type ResourceResizePolicy

type ResourceResizePolicy string

ResourceResizePolicy specifies how Kubernetes should handle resource resize.

const (
	// ResourceResizePolicyRestart tells Kubernetes to resize the container in-place
	// without restarting it, if possible. Kubernetes may however choose to
	// restart the container if it is unable to actuate resize without a
	// restart. For e.g. the runtime doesn't support restart-free resizing.
	ResourceResizePolicyRestart ResourceResizePolicy = "Restart"
	// ResourceResizePolicyNone tells Kubernetes to resize the container in-place
	// by stopping and starting the container when new resources are applied.
	// This is needed for legacy applications. For e.g. java apps using the
	// -xmxN flag which are unable to use resized memory without restarting.
	ResourceResizePolicyNone ResourceResizePolicy = "None"
)

These are the valid resource resize policy values:

type VerticalPodAutoscalerCondition

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

VerticalPodAutoscalerCondition describes the state of a KatalystVerticalPodAutoscaler 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 KatalystVerticalPodAutoscaler.

const (
	// NoPodsMatched indicates that target reference used with VPA object didn't match any pods.
	NoPodsMatched VerticalPodAutoscalerConditionType = "NoPodsMatched"
	// RecommendationUpdated indicates that the recommendation was written in Pod Annotations
	RecommendationUpdated VerticalPodAutoscalerConditionType = "RecommendationUpdated"
	// RecommendationApplied indicates that the recommendation was finally applied in Pod
	RecommendationApplied VerticalPodAutoscalerConditionType = "RecommendationApplied"
)

type VerticalPodAutoscalerRecommendation

type VerticalPodAutoscalerRecommendation struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a VerticalPodAutoscalerRecommendation.
	// +optional
	Spec VerticalPodAutoscalerRecommendationSpec `json:"spec,omitempty"`

	// Status represents the current information about a VerticalPodAutoscalerRecommendation.
	// +optional
	Status VerticalPodAutoscalerRecommendationStatus `json:"status,omitempty"`
}

VerticalPodAutoscalerRecommendation captures information about a VPA Recommendation

func (*VerticalPodAutoscalerRecommendation) DeepCopy

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

func (*VerticalPodAutoscalerRecommendation) DeepCopyInto

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

func (*VerticalPodAutoscalerRecommendation) DeepCopyObject

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

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

type VerticalPodAutoscalerRecommendationCondition

type VerticalPodAutoscalerRecommendationCondition struct {
	// type describes the current condition
	Type VerticalPodAutoscalerRecommendationConditionType `json:"type"`
	// status is the status of the condition (True, False, Unknown)
	Status v1.ConditionStatus `json:"status"`
	// lastTransitionTime is the last time the condition transitioned from
	// one status to another
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// reason is the reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// message is a human-readable explanation containing details about
	// the transition
	// +optional
	Message string `json:"message,omitempty"`
}

VerticalPodAutoscalerRecommendationCondition describes the state of a VerticalPodAutoscalerRecommendation at a certain point.

func (*VerticalPodAutoscalerRecommendationCondition) DeepCopy

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

func (*VerticalPodAutoscalerRecommendationCondition) DeepCopyInto

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

type VerticalPodAutoscalerRecommendationConditionType

type VerticalPodAutoscalerRecommendationConditionType string

VerticalPodAutoscalerRecommendationConditionType are the valid conditions of a VerticalPodAutoscalerRecommendation.

const (
	// NoVPAMatched indicates that vparec didn't match any vpa.
	NoVPAMatched VerticalPodAutoscalerRecommendationConditionType = "NoVPAMatched"
	// RecommendationUpdatedToVPA indicates that the recommendation was written in VPA status
	RecommendationUpdatedToVPA VerticalPodAutoscalerRecommendationConditionType = "RecommendationUpdatedToVPA"
)

type VerticalPodAutoscalerRecommendationList

type VerticalPodAutoscalerRecommendationList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// items is the list of CNRs
	Items []VerticalPodAutoscalerRecommendation `json:"items"`
}

VerticalPodAutoscalerRecommendationList is a collection of CNR objects.

func (*VerticalPodAutoscalerRecommendationList) DeepCopy

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

func (*VerticalPodAutoscalerRecommendationList) DeepCopyInto

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

func (*VerticalPodAutoscalerRecommendationList) DeepCopyObject

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

type VerticalPodAutoscalerRecommendationSpec

type VerticalPodAutoscalerRecommendationSpec struct {
	// The most recently computed amount of resources recommended by the
	// autoscaler for the controlled pods.
	// +optional
	PodRecommendations []RecommendedPodResources `json:"podRecommendations,omitempty"`
	// default container resources recommended by the
	// autoscaler for the controlled containers.
	// It will be overwritten by PodRecommendations
	// +optional
	ContainerRecommendations []RecommendedContainerResources `json:"containerRecommendations,omitempty"`
}

VerticalPodAutoscalerRecommendationSpec is the specification of the behavior of the autoscaler. OwnerReference is needed to point to corresponding VPA CRD

func (*VerticalPodAutoscalerRecommendationSpec) DeepCopy

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

func (*VerticalPodAutoscalerRecommendationSpec) DeepCopyInto

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

type VerticalPodAutoscalerRecommendationStatus

type VerticalPodAutoscalerRecommendationStatus struct {
	// PodRecommendations is the most recently recommendation handled by the controller.
	// +optional
	PodRecommendations []RecommendedPodResources `json:"podRecommendations,omitempty"`

	// ContainerRecommendations is the most recently defaultRecommendation handled by the controller
	// +optional
	ContainerRecommendations []RecommendedContainerResources `json:"containerRecommendations,omitempty"`

	// Conditions is the set of conditions required for this vparec to scale its target,
	// and indicates whether those conditions are met.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []VerticalPodAutoscalerRecommendationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

VerticalPodAutoscalerRecommendationStatus is the recommendation of resources computed by

func (*VerticalPodAutoscalerRecommendationStatus) DeepCopy

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

func (*VerticalPodAutoscalerRecommendationStatus) 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