v1alpha1

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the autoscaling API. +k8s:deepcopy-gen=package,register +groupName=autoscaling.crane.io

Index

Constants

View Source
const GroupName = "autoscaling.crane.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ConditionType

type ConditionType string
const (
	// PredictionReady indicates that the prediction is ready.
	// For enabled prediction effective-hpa.
	PredictionReady ConditionType = "PredictionReady"
	// Ready indicates that whole autoscaling is running as expect.
	Ready ConditionType = "Ready"
)

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,omitempty"`
	// ScaleUpPolicy define the policy when scale up containers resources.
	// +optional
	ScaleUpPolicy *ContainerScalingPolicy `json:"scaleUpPolicy,omitempty"`
	// ScaleDownPolicy define the policy when scale down containers resources.
	// +optional
	ScaleDownPolicy *ContainerScalingPolicy `json:"scaleDownPolicy,omitempty"`
	// 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, ResourceMemory] will be used.
	ControlledResources *[]ResourceName `json:"controlledResources,omitempty" patchStrategy:"merge"`

	// Specifies which resource values should be controlled.
	// The default is "RequestsAndLimits".
	// +optional
	ControlledValues *vpatypes.ContainerControlledValues `json:"controlledValues,omitempty"`
}

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 ContainerScalingPolicy

type ContainerScalingPolicy struct {
	// ScaleMode controls Whether autoscaler is enabled for the container.
	// The default is "Auto".
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Auto;Off
	// +kubebuilder:default=Auto
	ScaleMode *vpatypes.ContainerScalingMode `json:"mode,omitempty"`

	// MetricThresholds defines resource usages thresholds for vertical scaling.
	// Only if actual usage is reached to threshold, autoscaling estimator will be triggered.
	MetricThresholds *ResourceMetricList `json:"metricThresholds,omitempty"`

	// StabilizationWindowSeconds is the number of seconds for which past vertical scaling
	// considered while scaling up or scaling down.
	// +optional
	// +kubebuilder:validation:Type=integer
	// +kubebuilder:default=3600
	StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"`
}

ContainerScalingPolicy define effective policy for vertical scaling in certain direction: Up or Down

func (*ContainerScalingPolicy) DeepCopy

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

func (*ContainerScalingPolicy) DeepCopyInto

func (in *ContainerScalingPolicy) DeepCopyInto(out *ContainerScalingPolicy)

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

type CronSpec

type CronSpec struct {
	// Name is the identifier of this cron scale. name must be unique in the same ehpa
	// +kubebuilder:validation:Type=string
	Name string `json:"name,omitempty"`
	// Description is the description of the cron
	// +optional
	// +kubebuilder:validation:Type=string
	Description string `json:"description,omitempty"`
	// TimeZone is the time zone of this cron schedule running in, default is UTC time.
	// +optional
	// +kubebuilder:validation:Type=string
	TimeZone *string `json:"timezone,omitempty"`
	// Start is a crontab format, see https://en.wikipedia.org/wiki/Cron
	// Define the cron schedule start, when the cron start is triggered, hpa will reconcile targetRef to scale to the TargetReplicas continuously.
	// +kubebuilder:validation:Type=string
	Start string `json:"start,omitempty"`
	// End is a crontab format, see https://en.wikipedia.org/wiki/Cron
	// Define the cron schedule end, when it ended, EHPA will stop to trigger hpa to scale.
	// Between the start and end, EHPA will keep replicas of the targetRef to equal to TargetReplicas, a scaling is a process rather than a instant action, make it as a final consistent system.
	// +kubebuilder:validation:Type=string
	End string `json:"end,omitempty"`
	// TargetReplicas is the target replicas when it is time to do scale between cron start and end
	// +kubebuilder:validation:Type=integer
	TargetReplicas int32 `json:"targetReplicas,omitempty"`
}

CronSpec defines the cron scale info

func (*CronSpec) DeepCopy

func (in *CronSpec) DeepCopy() *CronSpec

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

func (*CronSpec) DeepCopyInto

func (in *CronSpec) DeepCopyInto(out *CronSpec)

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

type EffectiveHorizontalPodAutoscaler

type EffectiveHorizontalPodAutoscaler struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec EffectiveHorizontalPodAutoscalerSpec `json:"spec,omitempty"`

	// +optional
	Status EffectiveHorizontalPodAutoscalerStatus `json:"status,omitempty"`
}

EffectiveHorizontalPodAutoscaler is the Schema for the effectivehorizontalpodautoscaler API

func (*EffectiveHorizontalPodAutoscaler) DeepCopy

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

func (*EffectiveHorizontalPodAutoscaler) DeepCopyInto

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

func (*EffectiveHorizontalPodAutoscaler) DeepCopyObject

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

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

type EffectiveHorizontalPodAutoscalerList

type EffectiveHorizontalPodAutoscalerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []EffectiveHorizontalPodAutoscaler `json:"items"`
}

EffectiveHorizontalPodAutoscalerList contains a list of EffectiveHorizontalPodAutoscaler

func (*EffectiveHorizontalPodAutoscalerList) DeepCopy

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

func (*EffectiveHorizontalPodAutoscalerList) DeepCopyInto

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

func (*EffectiveHorizontalPodAutoscalerList) DeepCopyObject

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

type EffectiveHorizontalPodAutoscalerSpec

type EffectiveHorizontalPodAutoscalerSpec struct {
	// ScaleTargetRef is the reference to the workload that should be scaled.
	ScaleTargetRef autoscalingv2.CrossVersionObjectReference `json:"scaleTargetRef"`
	// MinReplicas is the lower limit replicas to the scale target which the autoscaler can scale down to.
	// the default MinReplicas is 1.
	// +optional
	// +kubebuilder:default=1
	MinReplicas *int32 `json:"minReplicas,omitempty"`
	// MaxReplicas is the upper limit replicas to the scale target which the autoscaler can scale up to.
	// It cannot be less that MinReplicas.
	MaxReplicas int32 `json:"maxReplicas"`
	// ScaleStrategy indicate the strategy to scaling target, value can be "Auto" and "Preview"
	// the default ScaleStrategy is Auto.
	// +optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Auto;Preview
	// +kubebuilder:default=Auto
	ScaleStrategy ScaleStrategy `json:"scaleStrategy"`
	// SpecificReplicas specify the target replicas if ScaleStrategy is Preview
	// If not set, when ScaleStrategy is setting to Preview, it will just stop scaling
	// +optional
	// +kubebuilder:validation:Type=integer
	SpecificReplicas *int32 `json:"specificReplicas,omitempty"`
	// metrics contains the specifications for which to use to calculate the
	// desired replica count (the maximum replica count across all metrics will
	// be used).  The desired replica count is calculated multiplying the
	// ratio between the target value and the current value by the current
	// number of pods.  Ergo, metrics used must decrease as the pod count is
	// increased, and vice-versa.  See the individual metric source types for
	// more information about how each type of metric must respond.
	// If not set, the default metric will be set to 80% average CPU utilization.
	// +optional
	Metrics []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
	// Crons contains cron specs to use crontab to scale workloads
	// +optional
	Crons []CronSpec `json:"crons,omitempty"`
	// behavior configures the scaling behavior of the target
	// in both Up and Down directions (scaleUp and scaleDown fields respectively).
	// If not set, the default HPAScalingRules for scale up and scale down are used.
	// +optional
	Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"`
	// Prediction defines configurations for predict resources.
	// If unspecified, defaults don't enable prediction.
	Prediction *Prediction `json:"prediction,omitempty"`
}

EffectiveHorizontalPodAutoscalerSpec defines the desired spec of EffectiveHorizontalPodAutoscaler

func (*EffectiveHorizontalPodAutoscalerSpec) DeepCopy

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

func (*EffectiveHorizontalPodAutoscalerSpec) DeepCopyInto

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

type EffectiveHorizontalPodAutoscalerStatus

type EffectiveHorizontalPodAutoscalerStatus struct {
	// ExpectReplicas is the expected replicas to scale to.
	// +optional
	ExpectReplicas *int32 `json:"expectReplicas,omitempty"`
	// CurrentReplicas is the current replicas to the scale target.
	// +optional
	CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
	// LastScaleTime indicates the last time to execute scaling.
	// +optional
	LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"`
	// Conditions is an array of current autoscaler conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*EffectiveHorizontalPodAutoscalerStatus) DeepCopy

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

func (*EffectiveHorizontalPodAutoscalerStatus) DeepCopyInto

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

type EffectiveVerticalPodAutoscaler

type EffectiveVerticalPodAutoscaler struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec EffectiveVerticalPodAutoscalerSpec `json:"spec"`

	// +optional
	Status EffectiveVerticalPodAutoscalerStatus `json:"status,omitempty"`
}

EffectiveVerticalPodAutoscaler is the Schema for the effectiveverticalpodautoscaler API

func (*EffectiveVerticalPodAutoscaler) DeepCopy

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

func (*EffectiveVerticalPodAutoscaler) DeepCopyInto

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

func (*EffectiveVerticalPodAutoscaler) DeepCopyObject

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

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

type EffectiveVerticalPodAutoscalerList

type EffectiveVerticalPodAutoscalerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []EffectiveVerticalPodAutoscaler `json:"items"`
}

EffectiveVerticalPodAutoscalerList contains a list of EffectiveVerticalPodAutoscaler

func (*EffectiveVerticalPodAutoscalerList) DeepCopy

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

func (*EffectiveVerticalPodAutoscalerList) DeepCopyInto

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

func (*EffectiveVerticalPodAutoscalerList) DeepCopyObject

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

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

type EffectiveVerticalPodAutoscalerSpec

type EffectiveVerticalPodAutoscalerSpec struct {

	// TargetRef points to the controller managing the set of pods for the
	// autoscaler to control - e.g. Deployment, StatefulSet. VerticalPodAutoscaler
	// can be targeted at controller implementing scale subresource (the pod set is
	// retrieved from the controller's ScaleStatus) or some well known controllers
	// (e.g. for DaemonSet the pod set is read from the controller's spec).
	// If VerticalPodAutoscaler cannot use specified target it will report
	// ConfigUnsupported condition.
	// Note that VerticalPodAutoscaler does not require full implementation
	// of scale subresource - it will not use it to modify the replica count.
	// The only thing retrieved is a label selector matching pods grouped by
	// the target resource.
	TargetRef *autoscalingv2.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 *vpatypes.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"`

	// ResourceEstimators Contains the specifications for estimators.
	// +optional
	ResourceEstimators []ResourceEstimator `json:"resourceEstimators,omitempty"`
}

func (*EffectiveVerticalPodAutoscalerSpec) DeepCopy

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

func (*EffectiveVerticalPodAutoscalerSpec) DeepCopyInto

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

type EffectiveVerticalPodAutoscalerStatus

type EffectiveVerticalPodAutoscalerStatus struct {
	// CurrentEstimators is the last state of the estimators used by this autoscaler
	CurrentEstimators []ResourceEstimatorStatus `json:"currentEstimators,omitempty"`

	// The most recently computed amount of resources recommended by the
	// autoscaler for the controlled pods.
	// +optional
	Recommendation *vpatypes.RecommendedPodResources `json:"recommendation,omitempty"`

	// Conditions is an array of current autoscaler conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

EffectiveVerticalPodAutoscalerStatus describes the runtime state of the autoscaler.

func (*EffectiveVerticalPodAutoscalerStatus) DeepCopy

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

func (*EffectiveVerticalPodAutoscalerStatus) DeepCopyInto

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.
	// +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 and optionally a single wildcard entry with `containerName` = '*', which handles all containers that don't have individual policies.

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 Prediction

type Prediction struct {
	// PredictionWindowSeconds is the time window seconds to predict metrics in the future.
	// +optional
	// +kubebuilder:validation:Type=integer
	// +kubebuilder:default=3600
	PredictionWindowSeconds *int32 `json:"predictionWindowSeconds,omitempty"`
	// PredictionAlgorithm contains all algorithm config that provider by prediction api.
	// +optional
	PredictionAlgorithm *PredictionAlgorithm `json:"predictionAlgorithm,omitempty"`
}

Prediction defines configurations for predict resources

func (*Prediction) DeepCopy

func (in *Prediction) DeepCopy() *Prediction

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

func (*Prediction) DeepCopyInto

func (in *Prediction) DeepCopyInto(out *Prediction)

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

type PredictionAlgorithm

type PredictionAlgorithm struct {
	// AlgorithmType specifies algorithm to predict resource
	AlgorithmType predictionapi.AlgorithmType `json:"algorithmType,omitempty"`
	// +optional
	DSP *predictionapi.DSP `json:"dsp,omitempty"`
	// +optional
	Percentile *predictionapi.Percentile `json:"percentile,omitempty"`
}

PredictionAlgorithm defines the algorithm to predict resources

func (*PredictionAlgorithm) DeepCopy

func (in *PredictionAlgorithm) DeepCopy() *PredictionAlgorithm

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

func (*PredictionAlgorithm) DeepCopyInto

func (in *PredictionAlgorithm) DeepCopyInto(out *PredictionAlgorithm)

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

type ResourceEstimator

type ResourceEstimator struct {
	// Type defines the type for this estimator.
	// +optional
	Type string `json:"type,omitempty"`

	// Priority defines the priority for this estimator.
	// +optional
	Priority int `json:"priority,omitempty"`

	// Config contains key value pairs for this estimator
	// for example, we can define configs like:
	// key1: value1
	// key2: value2
	// these configs will pass into estimators when execute scaling
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

ResourceEstimator defines the spec for resource estimator

func (*ResourceEstimator) DeepCopy

func (in *ResourceEstimator) DeepCopy() *ResourceEstimator

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

func (*ResourceEstimator) DeepCopyInto

func (in *ResourceEstimator) DeepCopyInto(out *ResourceEstimator)

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

type ResourceEstimatorStatus

type ResourceEstimatorStatus struct {
	// Type defines the type for this estimator.
	// +optional
	Type string `json:"type,omitempty"`

	// LastUpdateTime is the last time the status updated.
	// +optional
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// The most recently computed amount of resources recommended by the
	// estimator for the controlled pods.
	// +optional
	Recommendation *vpatypes.RecommendedPodResources `json:"recommendation,omitempty"`
}

ResourceEstimatorStatus contains state for resource estimator

func (*ResourceEstimatorStatus) DeepCopy

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

func (*ResourceEstimatorStatus) DeepCopyInto

func (in *ResourceEstimatorStatus) DeepCopyInto(out *ResourceEstimatorStatus)

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

type ResourceMetric

type ResourceMetric struct {
	// Utilization is the target value of resource recommended ratio.
	// +optional
	Utilization *int32 `json:"utilization,omitempty"`
}

func (*ResourceMetric) DeepCopy

func (in *ResourceMetric) DeepCopy() *ResourceMetric

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

func (*ResourceMetric) DeepCopyInto

func (in *ResourceMetric) DeepCopyInto(out *ResourceMetric)

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

type ResourceMetricList

type ResourceMetricList map[ResourceName]ResourceMetric

func (ResourceMetricList) DeepCopy

func (in ResourceMetricList) DeepCopy() ResourceMetricList

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

func (ResourceMetricList) DeepCopyInto

func (in ResourceMetricList) DeepCopyInto(out *ResourceMetricList)

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

type ResourceName

type ResourceName string

type ScaleStrategy

type ScaleStrategy string
const (
	// ScaleStrategyAuto execute scale based on metrics.
	ScaleStrategyAuto ScaleStrategy = "Auto"
	// ScaleStrategyPreview is the preview for ScaleStrategyAuto.
	ScaleStrategyPreview ScaleStrategy = "Preview"
)

type Substitute

type Substitute struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec SubstituteSpec `json:"spec,omitempty"`

	// +optional
	Status SubstituteStatus `json:"status,omitempty"`
}

Substitute is the Schema for the Substitute API

func (*Substitute) DeepCopy

func (in *Substitute) DeepCopy() *Substitute

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

func (*Substitute) DeepCopyInto

func (in *Substitute) DeepCopyInto(out *Substitute)

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

func (*Substitute) DeepCopyObject

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

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

type SubstituteList

type SubstituteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Substitute `json:"items"`
}

SubstituteList contains a list of Substitute

func (*SubstituteList) DeepCopy

func (in *SubstituteList) DeepCopy() *SubstituteList

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

func (*SubstituteList) DeepCopyInto

func (in *SubstituteList) DeepCopyInto(out *SubstituteList)

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

func (*SubstituteList) DeepCopyObject

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

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

type SubstituteSpec

type SubstituteSpec struct {
	// Replicas is used by presents dryRun replicas for SubstituteTargetRef.
	Replicas int32 `json:"replicas,omitempty"`

	// SubstituteTargetRef is the reference to the workload that should be Substituted.
	SubstituteTargetRef autoscalingv2.CrossVersionObjectReference `json:"substituteTargetRef"`
}

SubstituteSpec defines the desired spec of Substitute

func (*SubstituteSpec) DeepCopy

func (in *SubstituteSpec) DeepCopy() *SubstituteSpec

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

func (*SubstituteSpec) DeepCopyInto

func (in *SubstituteSpec) DeepCopyInto(out *SubstituteSpec)

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

type SubstituteStatus

type SubstituteStatus struct {
	// LabelSelector is label selectors that is sync with SubstituteTargetRef's labelSelector which used by HPA.
	// +optional
	LabelSelector string `json:"labelSelector,omitempty"`

	// Replicas is used by presents dryRun replicas for SubstituteTargetRef.
	// status.replicas should be equal to spec.replicas.
	Replicas int32 `json:"replicas,omitempty"`
}

SubstituteStatus defines the status of Substitute

func (*SubstituteStatus) DeepCopy

func (in *SubstituteStatus) DeepCopy() *SubstituteStatus

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

func (*SubstituteStatus) DeepCopyInto

func (in *SubstituteStatus) DeepCopyInto(out *SubstituteStatus)

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