package v2
import "k8s.io/client-go/applyconfigurations/autoscaling/v2"
Index ¶
- type ContainerResourceMetricSourceApplyConfiguration
- func ContainerResourceMetricSource() *ContainerResourceMetricSourceApplyConfiguration
- func (b *ContainerResourceMetricSourceApplyConfiguration) WithContainer(value string) *ContainerResourceMetricSourceApplyConfiguration
- func (b *ContainerResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricSourceApplyConfiguration
- func (b *ContainerResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ContainerResourceMetricSourceApplyConfiguration
- type ContainerResourceMetricStatusApplyConfiguration
- func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration
- func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration
- func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ContainerResourceMetricStatusApplyConfiguration
- func (b *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration
- type CrossVersionObjectReferenceApplyConfiguration
- func CrossVersionObjectReference() *CrossVersionObjectReferenceApplyConfiguration
- func (b *CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion(value string) *CrossVersionObjectReferenceApplyConfiguration
- func (b *CrossVersionObjectReferenceApplyConfiguration) WithKind(value string) *CrossVersionObjectReferenceApplyConfiguration
- func (b *CrossVersionObjectReferenceApplyConfiguration) WithName(value string) *CrossVersionObjectReferenceApplyConfiguration
- type ExternalMetricSourceApplyConfiguration
- func ExternalMetricSource() *ExternalMetricSourceApplyConfiguration
- func (b *ExternalMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricSourceApplyConfiguration
- func (b *ExternalMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ExternalMetricSourceApplyConfiguration
- type ExternalMetricStatusApplyConfiguration
- func ExternalMetricStatus() *ExternalMetricStatusApplyConfiguration
- func (b *ExternalMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ExternalMetricStatusApplyConfiguration
- func (b *ExternalMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricStatusApplyConfiguration
- type HPAScalingPolicyApplyConfiguration
- func HPAScalingPolicy() *HPAScalingPolicyApplyConfiguration
- func (b *HPAScalingPolicyApplyConfiguration) WithPeriodSeconds(value int32) *HPAScalingPolicyApplyConfiguration
- func (b *HPAScalingPolicyApplyConfiguration) WithType(value autoscalingv2.HPAScalingPolicyType) *HPAScalingPolicyApplyConfiguration
- func (b *HPAScalingPolicyApplyConfiguration) WithValue(value int32) *HPAScalingPolicyApplyConfiguration
- type HPAScalingRulesApplyConfiguration
- func HPAScalingRules() *HPAScalingRulesApplyConfiguration
- func (b *HPAScalingRulesApplyConfiguration) WithPolicies(values ...*HPAScalingPolicyApplyConfiguration) *HPAScalingRulesApplyConfiguration
- func (b *HPAScalingRulesApplyConfiguration) WithSelectPolicy(value autoscalingv2.ScalingPolicySelect) *HPAScalingRulesApplyConfiguration
- func (b *HPAScalingRulesApplyConfiguration) WithStabilizationWindowSeconds(value int32) *HPAScalingRulesApplyConfiguration
- func (b *HPAScalingRulesApplyConfiguration) WithTolerance(value resource.Quantity) *HPAScalingRulesApplyConfiguration
- type HorizontalPodAutoscalerApplyConfiguration
- func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error)
- func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error)
- func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error)
- func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) GetAPIVersion() *string
- func (b *HorizontalPodAutoscalerApplyConfiguration) GetKind() *string
- func (b *HorizontalPodAutoscalerApplyConfiguration) GetName() *string
- func (b *HorizontalPodAutoscalerApplyConfiguration) GetNamespace() *string
- func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration()
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithAPIVersion(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithAnnotations(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithGenerateName(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithGeneration(value int64) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithKind(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithLabels(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithName(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithResourceVersion(value string) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithSpec(value *HorizontalPodAutoscalerSpecApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithStatus(value *HorizontalPodAutoscalerStatusApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
- func (b *HorizontalPodAutoscalerApplyConfiguration) WithUID(value types.UID) *HorizontalPodAutoscalerApplyConfiguration
- type HorizontalPodAutoscalerBehaviorApplyConfiguration
- func HorizontalPodAutoscalerBehavior() *HorizontalPodAutoscalerBehaviorApplyConfiguration
- func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleDown(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration
- func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleUp(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration
- type HorizontalPodAutoscalerConditionApplyConfiguration
- func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration
- func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration
- func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration
- func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration
- func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration
- func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value autoscalingv2.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration
- type HorizontalPodAutoscalerSpecApplyConfiguration
- func HorizontalPodAutoscalerSpec() *HorizontalPodAutoscalerSpecApplyConfiguration
- func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithBehavior(value *HorizontalPodAutoscalerBehaviorApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
- func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMaxReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration
- func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMetrics(values ...*MetricSpecApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
- func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMinReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration
- func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithScaleTargetRef(value *CrossVersionObjectReferenceApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
- type HorizontalPodAutoscalerStatusApplyConfiguration
- func HorizontalPodAutoscalerStatus() *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithConditions(values ...*HorizontalPodAutoscalerConditionApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentMetrics(values ...*MetricStatusApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime(value v1.Time) *HorizontalPodAutoscalerStatusApplyConfiguration
- func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerStatusApplyConfiguration
- type MetricIdentifierApplyConfiguration
- func MetricIdentifier() *MetricIdentifierApplyConfiguration
- func (b *MetricIdentifierApplyConfiguration) WithName(value string) *MetricIdentifierApplyConfiguration
- func (b *MetricIdentifierApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *MetricIdentifierApplyConfiguration
- type MetricSpecApplyConfiguration
- func MetricSpec() *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithContainerResource(value *ContainerResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithExternal(value *ExternalMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithObject(value *ObjectMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithPods(value *PodsMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithResource(value *ResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
- func (b *MetricSpecApplyConfiguration) WithType(value autoscalingv2.MetricSourceType) *MetricSpecApplyConfiguration
- type MetricStatusApplyConfiguration
- func MetricStatus() *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithContainerResource(value *ContainerResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithExternal(value *ExternalMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithObject(value *ObjectMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithPods(value *PodsMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithResource(value *ResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
- func (b *MetricStatusApplyConfiguration) WithType(value autoscalingv2.MetricSourceType) *MetricStatusApplyConfiguration
- type MetricTargetApplyConfiguration
- func MetricTarget() *MetricTargetApplyConfiguration
- func (b *MetricTargetApplyConfiguration) WithAverageUtilization(value int32) *MetricTargetApplyConfiguration
- func (b *MetricTargetApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricTargetApplyConfiguration
- func (b *MetricTargetApplyConfiguration) WithType(value autoscalingv2.MetricTargetType) *MetricTargetApplyConfiguration
- func (b *MetricTargetApplyConfiguration) WithValue(value resource.Quantity) *MetricTargetApplyConfiguration
- type MetricValueStatusApplyConfiguration
- func MetricValueStatus() *MetricValueStatusApplyConfiguration
- func (b *MetricValueStatusApplyConfiguration) WithAverageUtilization(value int32) *MetricValueStatusApplyConfiguration
- func (b *MetricValueStatusApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricValueStatusApplyConfiguration
- func (b *MetricValueStatusApplyConfiguration) WithValue(value resource.Quantity) *MetricValueStatusApplyConfiguration
- type ObjectMetricSourceApplyConfiguration
- func ObjectMetricSource() *ObjectMetricSourceApplyConfiguration
- func (b *ObjectMetricSourceApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricSourceApplyConfiguration
- func (b *ObjectMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricSourceApplyConfiguration
- func (b *ObjectMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ObjectMetricSourceApplyConfiguration
- type ObjectMetricStatusApplyConfiguration
- func ObjectMetricStatus() *ObjectMetricStatusApplyConfiguration
- func (b *ObjectMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ObjectMetricStatusApplyConfiguration
- func (b *ObjectMetricStatusApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricStatusApplyConfiguration
- func (b *ObjectMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricStatusApplyConfiguration
- type PodsMetricSourceApplyConfiguration
- func PodsMetricSource() *PodsMetricSourceApplyConfiguration
- func (b *PodsMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricSourceApplyConfiguration
- func (b *PodsMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *PodsMetricSourceApplyConfiguration
- type PodsMetricStatusApplyConfiguration
- func PodsMetricStatus() *PodsMetricStatusApplyConfiguration
- func (b *PodsMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *PodsMetricStatusApplyConfiguration
- func (b *PodsMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricStatusApplyConfiguration
- type ResourceMetricSourceApplyConfiguration
- func ResourceMetricSource() *ResourceMetricSourceApplyConfiguration
- func (b *ResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricSourceApplyConfiguration
- func (b *ResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ResourceMetricSourceApplyConfiguration
- type ResourceMetricStatusApplyConfiguration
- func ResourceMetricStatus() *ResourceMetricStatusApplyConfiguration
- func (b *ResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ResourceMetricStatusApplyConfiguration
- func (b *ResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricStatusApplyConfiguration
Types ¶
type ContainerResourceMetricSourceApplyConfiguration ¶
type ContainerResourceMetricSourceApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// target specifies the target value for the given metric
Target *MetricTargetApplyConfiguration `json:"target,omitempty"`
// container is the name of the container in the pods of the scaling target
Container *string `json:"container,omitempty"`
}
ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use with apply.
ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set.
func ContainerResourceMetricSource ¶
func ContainerResourceMetricSource() *ContainerResourceMetricSourceApplyConfiguration
ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with apply.
func (*ContainerResourceMetricSourceApplyConfiguration) WithContainer ¶
func (b *ContainerResourceMetricSourceApplyConfiguration) WithContainer(value string) *ContainerResourceMetricSourceApplyConfiguration
WithContainer sets the Container field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Container field is set to the value of the last call.
func (*ContainerResourceMetricSourceApplyConfiguration) WithName ¶
func (b *ContainerResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricSourceApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*ContainerResourceMetricSourceApplyConfiguration) WithTarget ¶
func (b *ContainerResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ContainerResourceMetricSourceApplyConfiguration
WithTarget sets the Target field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Target field is set to the value of the last call.
type ContainerResourceMetricStatusApplyConfiguration ¶
type ContainerResourceMetricStatusApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
// container is the name of the container in the pods of the scaling target
Container *string `json:"container,omitempty"`
}
ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use with apply.
ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
func ContainerResourceMetricStatus ¶
func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration
ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with apply.
func (*ContainerResourceMetricStatusApplyConfiguration) WithContainer ¶
func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration
WithContainer sets the Container field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Container field is set to the value of the last call.
func (*ContainerResourceMetricStatusApplyConfiguration) WithCurrent ¶
func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ContainerResourceMetricStatusApplyConfiguration
WithCurrent sets the Current field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Current field is set to the value of the last call.
func (*ContainerResourceMetricStatusApplyConfiguration) WithName ¶
func (b *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
type CrossVersionObjectReferenceApplyConfiguration ¶
type CrossVersionObjectReferenceApplyConfiguration struct {
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
// name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Name *string `json:"name,omitempty"`
// apiVersion is the API version of the referent
APIVersion *string `json:"apiVersion,omitempty"`
}
CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use with apply.
CrossVersionObjectReference contains enough information to let you identify the referred resource.
func CrossVersionObjectReference ¶
func CrossVersionObjectReference() *CrossVersionObjectReferenceApplyConfiguration
CrossVersionObjectReferenceApplyConfiguration constructs a declarative configuration of the CrossVersionObjectReference type for use with apply.
func (*CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion ¶
func (b *CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion(value string) *CrossVersionObjectReferenceApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*CrossVersionObjectReferenceApplyConfiguration) WithKind ¶
func (b *CrossVersionObjectReferenceApplyConfiguration) WithKind(value string) *CrossVersionObjectReferenceApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*CrossVersionObjectReferenceApplyConfiguration) WithName ¶
func (b *CrossVersionObjectReferenceApplyConfiguration) WithName(value string) *CrossVersionObjectReferenceApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
type ExternalMetricSourceApplyConfiguration ¶
type ExternalMetricSourceApplyConfiguration struct {
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// target specifies the target value for the given metric
Target *MetricTargetApplyConfiguration `json:"target,omitempty"`
}
ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use with apply.
ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
func ExternalMetricSource ¶
func ExternalMetricSource() *ExternalMetricSourceApplyConfiguration
ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with apply.
func (*ExternalMetricSourceApplyConfiguration) WithMetric ¶
func (b *ExternalMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricSourceApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
func (*ExternalMetricSourceApplyConfiguration) WithTarget ¶
func (b *ExternalMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ExternalMetricSourceApplyConfiguration
WithTarget sets the Target field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Target field is set to the value of the last call.
type ExternalMetricStatusApplyConfiguration ¶
type ExternalMetricStatusApplyConfiguration struct {
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
}
ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use with apply.
ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
func ExternalMetricStatus ¶
func ExternalMetricStatus() *ExternalMetricStatusApplyConfiguration
ExternalMetricStatusApplyConfiguration constructs a declarative configuration of the ExternalMetricStatus type for use with apply.
func (*ExternalMetricStatusApplyConfiguration) WithCurrent ¶
func (b *ExternalMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ExternalMetricStatusApplyConfiguration
WithCurrent sets the Current field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Current field is set to the value of the last call.
func (*ExternalMetricStatusApplyConfiguration) WithMetric ¶
func (b *ExternalMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricStatusApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
type HPAScalingPolicyApplyConfiguration ¶
type HPAScalingPolicyApplyConfiguration struct {
// type is used to specify the scaling policy.
Type *autoscalingv2.HPAScalingPolicyType `json:"type,omitempty"`
// value contains the amount of change which is permitted by the policy.
// It must be greater than zero
Value *int32 `json:"value,omitempty"`
// periodSeconds specifies the window of time for which the policy should hold true.
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
PeriodSeconds *int32 `json:"periodSeconds,omitempty"`
}
HPAScalingPolicyApplyConfiguration represents a declarative configuration of the HPAScalingPolicy type for use with apply.
HPAScalingPolicy is a single policy which must hold true for a specified past interval.
func HPAScalingPolicy ¶
func HPAScalingPolicy() *HPAScalingPolicyApplyConfiguration
HPAScalingPolicyApplyConfiguration constructs a declarative configuration of the HPAScalingPolicy type for use with apply.
func (*HPAScalingPolicyApplyConfiguration) WithPeriodSeconds ¶
func (b *HPAScalingPolicyApplyConfiguration) WithPeriodSeconds(value int32) *HPAScalingPolicyApplyConfiguration
WithPeriodSeconds sets the PeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PeriodSeconds field is set to the value of the last call.
func (*HPAScalingPolicyApplyConfiguration) WithType ¶
func (b *HPAScalingPolicyApplyConfiguration) WithType(value autoscalingv2.HPAScalingPolicyType) *HPAScalingPolicyApplyConfiguration
WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.
func (*HPAScalingPolicyApplyConfiguration) WithValue ¶
func (b *HPAScalingPolicyApplyConfiguration) WithValue(value int32) *HPAScalingPolicyApplyConfiguration
WithValue sets the Value field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Value field is set to the value of the last call.
type HPAScalingRulesApplyConfiguration ¶
type HPAScalingRulesApplyConfiguration struct {
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
// considered while scaling up or scaling down.
// StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).
// If not set, use the default values:
// - For scale up: 0 (i.e. no stabilization is done).
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"`
// selectPolicy is used to specify which policy should be used.
// If not set, the default value Max is used.
SelectPolicy *autoscalingv2.ScalingPolicySelect `json:"selectPolicy,omitempty"`
// policies is a list of potential scaling polices which can be used during scaling.
// If not set, use the default values:
// - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window.
// - For scale down: allow all pods to be removed in a 15s window.
Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"`
// tolerance is the tolerance on the ratio between the current and desired
// metric value under which no updates are made to the desired number of
// replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not
// set, the default cluster-wide tolerance is applied (by default 10%).
//
// For example, if autoscaling is configured with a memory consumption target of 100Mi,
// and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be
// triggered when the actual consumption falls below 95Mi or exceeds 101Mi.
//
// This is an beta field and requires the HPAConfigurableTolerance feature
// gate to be enabled.
Tolerance *resource.Quantity `json:"tolerance,omitempty"`
}
HPAScalingRulesApplyConfiguration represents a declarative configuration of the HPAScalingRules type for use with apply.
HPAScalingRules configures the scaling behavior for one direction via scaling Policy Rules and a configurable metric tolerance.
Scaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.
The tolerance is applied to the metric values and prevents scaling too eagerly for small metric variations. (Note that setting a tolerance requires the beta HPAConfigurableTolerance feature gate to be enabled.)
func HPAScalingRules ¶
func HPAScalingRules() *HPAScalingRulesApplyConfiguration
HPAScalingRulesApplyConfiguration constructs a declarative configuration of the HPAScalingRules type for use with apply.
func (*HPAScalingRulesApplyConfiguration) WithPolicies ¶
func (b *HPAScalingRulesApplyConfiguration) WithPolicies(values ...*HPAScalingPolicyApplyConfiguration) *HPAScalingRulesApplyConfiguration
WithPolicies adds the given value to the Policies field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Policies field.
func (*HPAScalingRulesApplyConfiguration) WithSelectPolicy ¶
func (b *HPAScalingRulesApplyConfiguration) WithSelectPolicy(value autoscalingv2.ScalingPolicySelect) *HPAScalingRulesApplyConfiguration
WithSelectPolicy sets the SelectPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the SelectPolicy field is set to the value of the last call.
func (*HPAScalingRulesApplyConfiguration) WithStabilizationWindowSeconds ¶
func (b *HPAScalingRulesApplyConfiguration) WithStabilizationWindowSeconds(value int32) *HPAScalingRulesApplyConfiguration
WithStabilizationWindowSeconds sets the StabilizationWindowSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the StabilizationWindowSeconds field is set to the value of the last call.
func (*HPAScalingRulesApplyConfiguration) WithTolerance ¶
func (b *HPAScalingRulesApplyConfiguration) WithTolerance(value resource.Quantity) *HPAScalingRulesApplyConfiguration
WithTolerance sets the Tolerance field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Tolerance field is set to the value of the last call.
type HorizontalPodAutoscalerApplyConfiguration ¶
type HorizontalPodAutoscalerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// metadata is the standard object metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec is the specification for the behaviour of the autoscaler.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"`
// status is the current information about the autoscaler.
Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"`
}
HorizontalPodAutoscalerApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscaler type for use with apply.
HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.
func ExtractHorizontalPodAutoscaler ¶
func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error)
ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. ExtractHorizontalPodAutoscaler provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractHorizontalPodAutoscalerFrom ¶
func ExtractHorizontalPodAutoscalerFrom(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error)
ExtractHorizontalPodAutoscalerFrom extracts the applied configuration owned by fieldManager from horizontalPodAutoscaler for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. ExtractHorizontalPodAutoscalerFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractHorizontalPodAutoscalerStatus ¶
func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error)
ExtractHorizontalPodAutoscalerStatus extracts the applied configuration owned by fieldManager from horizontalPodAutoscaler for the status subresource.
func HorizontalPodAutoscaler ¶
func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApplyConfiguration
HorizontalPodAutoscaler constructs a declarative configuration of the HorizontalPodAutoscaler type for use with apply.
func (*HorizontalPodAutoscalerApplyConfiguration) GetAPIVersion ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) GetAPIVersion() *string
GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (*HorizontalPodAutoscalerApplyConfiguration) GetKind ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) GetKind() *string
GetKind retrieves the value of the Kind field in the declarative configuration.
func (*HorizontalPodAutoscalerApplyConfiguration) GetName ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) GetName() *string
GetName retrieves the value of the Name field in the declarative configuration.
func (*HorizontalPodAutoscalerApplyConfiguration) GetNamespace ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) GetNamespace() *string
GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration ¶
func (b HorizontalPodAutoscalerApplyConfiguration) IsApplyConfiguration()
func (*HorizontalPodAutoscalerApplyConfiguration) WithAPIVersion ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithAPIVersion(value string) *HorizontalPodAutoscalerApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithAnnotations ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithAnnotations(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration
WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.
func (*HorizontalPodAutoscalerApplyConfiguration) WithCreationTimestamp ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration
WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithDeletionGracePeriodSeconds ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HorizontalPodAutoscalerApplyConfiguration
WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithDeletionTimestamp ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration
WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithFinalizers ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...string) *HorizontalPodAutoscalerApplyConfiguration
WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.
func (*HorizontalPodAutoscalerApplyConfiguration) WithGenerateName ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithGenerateName(value string) *HorizontalPodAutoscalerApplyConfiguration
WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithGeneration ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithGeneration(value int64) *HorizontalPodAutoscalerApplyConfiguration
WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithKind ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithKind(value string) *HorizontalPodAutoscalerApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithLabels ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithLabels(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration
WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.
func (*HorizontalPodAutoscalerApplyConfiguration) WithName ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithName(value string) *HorizontalPodAutoscalerApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithNamespace ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) *HorizontalPodAutoscalerApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithOwnerReferences ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (*HorizontalPodAutoscalerApplyConfiguration) WithResourceVersion ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithResourceVersion(value string) *HorizontalPodAutoscalerApplyConfiguration
WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithSpec ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithSpec(value *HorizontalPodAutoscalerSpecApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithStatus ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithStatus(value *HorizontalPodAutoscalerStatusApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration
WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.
func (*HorizontalPodAutoscalerApplyConfiguration) WithUID ¶
func (b *HorizontalPodAutoscalerApplyConfiguration) WithUID(value types.UID) *HorizontalPodAutoscalerApplyConfiguration
WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.
type HorizontalPodAutoscalerBehaviorApplyConfiguration ¶
type HorizontalPodAutoscalerBehaviorApplyConfiguration struct {
// scaleUp is scaling policy for scaling Up.
// If not set, the default value is the higher of:
// * increase no more than 4 pods per 60 seconds
// * double the number of pods per 60 seconds
// No stabilization is used.
ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"`
// scaleDown is scaling policy for scaling Down.
// If not set, the default value is to allow to scale down to minReplicas pods, with a
// 300 second stabilization window (i.e., the highest recommendation for
// the last 300sec is used).
ScaleDown *HPAScalingRulesApplyConfiguration `json:"scaleDown,omitempty"`
}
HorizontalPodAutoscalerBehaviorApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerBehavior type for use with apply.
HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
func HorizontalPodAutoscalerBehavior ¶
func HorizontalPodAutoscalerBehavior() *HorizontalPodAutoscalerBehaviorApplyConfiguration
HorizontalPodAutoscalerBehaviorApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerBehavior type for use with apply.
func (*HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleDown ¶
func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleDown(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration
WithScaleDown sets the ScaleDown field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ScaleDown field is set to the value of the last call.
func (*HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleUp ¶
func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleUp(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration
WithScaleUp sets the ScaleUp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ScaleUp field is set to the value of the last call.
type HorizontalPodAutoscalerConditionApplyConfiguration ¶
type HorizontalPodAutoscalerConditionApplyConfiguration struct {
// type describes the current condition
Type *autoscalingv2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"`
// status is the status of the condition (True, False, Unknown)
Status *v1.ConditionStatus `json:"status,omitempty"`
// lastTransitionTime is the last time the condition transitioned from
// one status to another
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
// reason is the reason for the condition's last transition.
Reason *string `json:"reason,omitempty"`
// message is a human-readable explanation containing details about
// the transition
Message *string `json:"message,omitempty"`
}
HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use with apply.
HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.
func HorizontalPodAutoscalerCondition ¶
func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration
HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with apply.
func (*HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime ¶
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration
WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (*HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage ¶
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration
WithMessage sets the Message field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Message field is set to the value of the last call.
func (*HorizontalPodAutoscalerConditionApplyConfiguration) WithReason ¶
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration
WithReason sets the Reason field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Reason field is set to the value of the last call.
func (*HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus ¶
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration
WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.
func (*HorizontalPodAutoscalerConditionApplyConfiguration) WithType ¶
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value autoscalingv2.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration
WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.
type HorizontalPodAutoscalerSpecApplyConfiguration ¶
type HorizontalPodAutoscalerSpecApplyConfiguration struct {
// scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
// should be collected, as well as to actually change the replica count.
ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"`
// minReplicas is the lower limit for the number of replicas to which the autoscaler
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
// metric is configured. Scaling is active as long as at least one metric value is
// available.
MinReplicas *int32 `json:"minReplicas,omitempty"`
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
// It cannot be less that minReplicas.
MaxReplicas *int32 `json:"maxReplicas,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.
Metrics []MetricSpecApplyConfiguration `json:"metrics,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.
Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"`
}
HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use with apply.
HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
func HorizontalPodAutoscalerSpec ¶
func HorizontalPodAutoscalerSpec() *HorizontalPodAutoscalerSpecApplyConfiguration
HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with apply.
func (*HorizontalPodAutoscalerSpecApplyConfiguration) WithBehavior ¶
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithBehavior(value *HorizontalPodAutoscalerBehaviorApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
WithBehavior sets the Behavior field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Behavior field is set to the value of the last call.
func (*HorizontalPodAutoscalerSpecApplyConfiguration) WithMaxReplicas ¶
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMaxReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration
WithMaxReplicas sets the MaxReplicas field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MaxReplicas field is set to the value of the last call.
func (*HorizontalPodAutoscalerSpecApplyConfiguration) WithMetrics ¶
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMetrics(values ...*MetricSpecApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
WithMetrics adds the given value to the Metrics field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Metrics field.
func (*HorizontalPodAutoscalerSpecApplyConfiguration) WithMinReplicas ¶
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMinReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration
WithMinReplicas sets the MinReplicas field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MinReplicas field is set to the value of the last call.
func (*HorizontalPodAutoscalerSpecApplyConfiguration) WithScaleTargetRef ¶
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithScaleTargetRef(value *CrossVersionObjectReferenceApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration
WithScaleTargetRef sets the ScaleTargetRef field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ScaleTargetRef field is set to the value of the last call.
type HorizontalPodAutoscalerStatusApplyConfiguration ¶
type HorizontalPodAutoscalerStatusApplyConfiguration struct {
// observedGeneration is the most recent generation observed by this autoscaler.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
// used by the autoscaler to control how often the number of pods is changed.
LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"`
// currentReplicas is current number of replicas of pods managed by this autoscaler,
// as last seen by the autoscaler.
CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
// as last calculated by the autoscaler.
DesiredReplicas *int32 `json:"desiredReplicas,omitempty"`
// currentMetrics is the last read state of the metrics used by this autoscaler.
CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"`
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"`
}
HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use with apply.
HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
func HorizontalPodAutoscalerStatus ¶
func HorizontalPodAutoscalerStatus() *HorizontalPodAutoscalerStatusApplyConfiguration
HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with apply.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithConditions ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithConditions(values ...*HorizontalPodAutoscalerConditionApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration
WithConditions adds the given value to the Conditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Conditions field.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentMetrics ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentMetrics(values ...*MetricStatusApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration
WithCurrentMetrics adds the given value to the CurrentMetrics field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the CurrentMetrics field.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration
WithCurrentReplicas sets the CurrentReplicas field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CurrentReplicas field is set to the value of the last call.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration
WithDesiredReplicas sets the DesiredReplicas field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DesiredReplicas field is set to the value of the last call.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime(value v1.Time) *HorizontalPodAutoscalerStatusApplyConfiguration
WithLastScaleTime sets the LastScaleTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastScaleTime field is set to the value of the last call.
func (*HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration ¶
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerStatusApplyConfiguration
WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ObservedGeneration field is set to the value of the last call.
type MetricIdentifierApplyConfiguration ¶
type MetricIdentifierApplyConfiguration struct {
// name is the name of the given metric
Name *string `json:"name,omitempty"`
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
// When unset, just the metricName will be used to gather metrics.
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
}
MetricIdentifierApplyConfiguration represents a declarative configuration of the MetricIdentifier type for use with apply.
MetricIdentifier defines the name and optionally selector for a metric
func MetricIdentifier ¶
func MetricIdentifier() *MetricIdentifierApplyConfiguration
MetricIdentifierApplyConfiguration constructs a declarative configuration of the MetricIdentifier type for use with apply.
func (*MetricIdentifierApplyConfiguration) WithName ¶
func (b *MetricIdentifierApplyConfiguration) WithName(value string) *MetricIdentifierApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*MetricIdentifierApplyConfiguration) WithSelector ¶
func (b *MetricIdentifierApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *MetricIdentifierApplyConfiguration
WithSelector sets the Selector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Selector field is set to the value of the last call.
type MetricSpecApplyConfiguration ¶
type MetricSpecApplyConfiguration struct {
// type is the type of metric source. It should be one of "ContainerResource", "External",
// "Object", "Pods" or "Resource", each mapping to a matching field in the object.
Type *autoscalingv2.MetricSourceType `json:"type,omitempty"`
// object refers to a metric describing a single kubernetes object
// (for example, hits-per-second on an Ingress object).
Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"`
// pods refers to a metric describing each pod in the current scale target
// (for example, transactions-processed-per-second). The values will be
// averaged together before being compared to the target value.
Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"`
// resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing each pod in the
// current scale target (e.g. CPU or memory). Such metrics are built in to
// Kubernetes, and have special scaling options on top of those available
// to normal per-pod metrics using the "pods" source.
Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"`
// containerResource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing a single container in
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
// built in to Kubernetes, and have special scaling options on top of those
// available to normal per-pod metrics using the "pods" source.
ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"`
// external refers to a global metric that is not associated
// with any Kubernetes object. It allows autoscaling based on information
// coming from components running outside of cluster
// (for example length of queue in cloud messaging service, or
// QPS from loadbalancer running outside of cluster).
External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"`
}
MetricSpecApplyConfiguration represents a declarative configuration of the MetricSpec type for use with apply.
MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).
func MetricSpec ¶
func MetricSpec() *MetricSpecApplyConfiguration
MetricSpecApplyConfiguration constructs a declarative configuration of the MetricSpec type for use with apply.
func (*MetricSpecApplyConfiguration) WithContainerResource ¶
func (b *MetricSpecApplyConfiguration) WithContainerResource(value *ContainerResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
WithContainerResource sets the ContainerResource field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ContainerResource field is set to the value of the last call.
func (*MetricSpecApplyConfiguration) WithExternal ¶
func (b *MetricSpecApplyConfiguration) WithExternal(value *ExternalMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
WithExternal sets the External field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the External field is set to the value of the last call.
func (*MetricSpecApplyConfiguration) WithObject ¶
func (b *MetricSpecApplyConfiguration) WithObject(value *ObjectMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
WithObject sets the Object field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Object field is set to the value of the last call.
func (*MetricSpecApplyConfiguration) WithPods ¶
func (b *MetricSpecApplyConfiguration) WithPods(value *PodsMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
WithPods sets the Pods field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Pods field is set to the value of the last call.
func (*MetricSpecApplyConfiguration) WithResource ¶
func (b *MetricSpecApplyConfiguration) WithResource(value *ResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration
WithResource sets the Resource field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Resource field is set to the value of the last call.
func (*MetricSpecApplyConfiguration) WithType ¶
func (b *MetricSpecApplyConfiguration) WithType(value autoscalingv2.MetricSourceType) *MetricSpecApplyConfiguration
WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.
type MetricStatusApplyConfiguration ¶
type MetricStatusApplyConfiguration struct {
// type is the type of metric source. It will be one of "ContainerResource", "External",
// "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
Type *autoscalingv2.MetricSourceType `json:"type,omitempty"`
// object refers to a metric describing a single kubernetes object
// (for example, hits-per-second on an Ingress object).
Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"`
// pods refers to a metric describing each pod in the current scale target
// (for example, transactions-processed-per-second). The values will be
// averaged together before being compared to the target value.
Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"`
// resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing each pod in the
// current scale target (e.g. CPU or memory). Such metrics are built in to
// Kubernetes, and have special scaling options on top of those available
// to normal per-pod metrics using the "pods" source.
Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"`
// container resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing a single container in each pod in the
// current scale target (e.g. CPU or memory). Such metrics are built in to
// Kubernetes, and have special scaling options on top of those available
// to normal per-pod metrics using the "pods" source.
ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"`
// external refers to a global metric that is not associated
// with any Kubernetes object. It allows autoscaling based on information
// coming from components running outside of cluster
// (for example length of queue in cloud messaging service, or
// QPS from loadbalancer running outside of cluster).
External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"`
}
MetricStatusApplyConfiguration represents a declarative configuration of the MetricStatus type for use with apply.
MetricStatus describes the last-read state of a single metric.
func MetricStatus ¶
func MetricStatus() *MetricStatusApplyConfiguration
MetricStatusApplyConfiguration constructs a declarative configuration of the MetricStatus type for use with apply.
func (*MetricStatusApplyConfiguration) WithContainerResource ¶
func (b *MetricStatusApplyConfiguration) WithContainerResource(value *ContainerResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
WithContainerResource sets the ContainerResource field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ContainerResource field is set to the value of the last call.
func (*MetricStatusApplyConfiguration) WithExternal ¶
func (b *MetricStatusApplyConfiguration) WithExternal(value *ExternalMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
WithExternal sets the External field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the External field is set to the value of the last call.
func (*MetricStatusApplyConfiguration) WithObject ¶
func (b *MetricStatusApplyConfiguration) WithObject(value *ObjectMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
WithObject sets the Object field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Object field is set to the value of the last call.
func (*MetricStatusApplyConfiguration) WithPods ¶
func (b *MetricStatusApplyConfiguration) WithPods(value *PodsMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
WithPods sets the Pods field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Pods field is set to the value of the last call.
func (*MetricStatusApplyConfiguration) WithResource ¶
func (b *MetricStatusApplyConfiguration) WithResource(value *ResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration
WithResource sets the Resource field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Resource field is set to the value of the last call.
func (*MetricStatusApplyConfiguration) WithType ¶
func (b *MetricStatusApplyConfiguration) WithType(value autoscalingv2.MetricSourceType) *MetricStatusApplyConfiguration
WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.
type MetricTargetApplyConfiguration ¶
type MetricTargetApplyConfiguration struct {
// type represents whether the metric type is Utilization, Value, or AverageValue
Type *autoscalingv2.MetricTargetType `json:"type,omitempty"`
// value is the target value of the metric (as a quantity).
Value *resource.Quantity `json:"value,omitempty"`
// averageValue is the target value of the average of the
// metric across all relevant pods (as a quantity)
AverageValue *resource.Quantity `json:"averageValue,omitempty"`
// averageUtilization is the target value of the average of the
// resource metric across all relevant pods, represented as a percentage of
// the requested value of the resource for the pods.
// Currently only valid for Resource metric source type
AverageUtilization *int32 `json:"averageUtilization,omitempty"`
}
MetricTargetApplyConfiguration represents a declarative configuration of the MetricTarget type for use with apply.
MetricTarget defines the target value, average value, or average utilization of a specific metric
func MetricTarget ¶
func MetricTarget() *MetricTargetApplyConfiguration
MetricTargetApplyConfiguration constructs a declarative configuration of the MetricTarget type for use with apply.
func (*MetricTargetApplyConfiguration) WithAverageUtilization ¶
func (b *MetricTargetApplyConfiguration) WithAverageUtilization(value int32) *MetricTargetApplyConfiguration
WithAverageUtilization sets the AverageUtilization field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the AverageUtilization field is set to the value of the last call.
func (*MetricTargetApplyConfiguration) WithAverageValue ¶
func (b *MetricTargetApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricTargetApplyConfiguration
WithAverageValue sets the AverageValue field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the AverageValue field is set to the value of the last call.
func (*MetricTargetApplyConfiguration) WithType ¶
func (b *MetricTargetApplyConfiguration) WithType(value autoscalingv2.MetricTargetType) *MetricTargetApplyConfiguration
WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.
func (*MetricTargetApplyConfiguration) WithValue ¶
func (b *MetricTargetApplyConfiguration) WithValue(value resource.Quantity) *MetricTargetApplyConfiguration
WithValue sets the Value field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Value field is set to the value of the last call.
type MetricValueStatusApplyConfiguration ¶
type MetricValueStatusApplyConfiguration struct {
// value is the current value of the metric (as a quantity).
Value *resource.Quantity `json:"value,omitempty"`
// averageValue is the current value of the average of the
// metric across all relevant pods (as a quantity)
AverageValue *resource.Quantity `json:"averageValue,omitempty"`
// currentAverageUtilization is the current value of the average of the
// resource metric across all relevant pods, represented as a percentage of
// the requested value of the resource for the pods.
AverageUtilization *int32 `json:"averageUtilization,omitempty"`
}
MetricValueStatusApplyConfiguration represents a declarative configuration of the MetricValueStatus type for use with apply.
MetricValueStatus holds the current value for a metric
func MetricValueStatus ¶
func MetricValueStatus() *MetricValueStatusApplyConfiguration
MetricValueStatusApplyConfiguration constructs a declarative configuration of the MetricValueStatus type for use with apply.
func (*MetricValueStatusApplyConfiguration) WithAverageUtilization ¶
func (b *MetricValueStatusApplyConfiguration) WithAverageUtilization(value int32) *MetricValueStatusApplyConfiguration
WithAverageUtilization sets the AverageUtilization field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the AverageUtilization field is set to the value of the last call.
func (*MetricValueStatusApplyConfiguration) WithAverageValue ¶
func (b *MetricValueStatusApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricValueStatusApplyConfiguration
WithAverageValue sets the AverageValue field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the AverageValue field is set to the value of the last call.
func (*MetricValueStatusApplyConfiguration) WithValue ¶
func (b *MetricValueStatusApplyConfiguration) WithValue(value resource.Quantity) *MetricValueStatusApplyConfiguration
WithValue sets the Value field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Value field is set to the value of the last call.
type ObjectMetricSourceApplyConfiguration ¶
type ObjectMetricSourceApplyConfiguration struct {
// describedObject specifies the descriptions of a object,such as kind,name apiVersion
DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"`
// target specifies the target value for the given metric
Target *MetricTargetApplyConfiguration `json:"target,omitempty"`
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
}
ObjectMetricSourceApplyConfiguration represents a declarative configuration of the ObjectMetricSource type for use with apply.
ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
func ObjectMetricSource ¶
func ObjectMetricSource() *ObjectMetricSourceApplyConfiguration
ObjectMetricSourceApplyConfiguration constructs a declarative configuration of the ObjectMetricSource type for use with apply.
func (*ObjectMetricSourceApplyConfiguration) WithDescribedObject ¶
func (b *ObjectMetricSourceApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricSourceApplyConfiguration
WithDescribedObject sets the DescribedObject field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DescribedObject field is set to the value of the last call.
func (*ObjectMetricSourceApplyConfiguration) WithMetric ¶
func (b *ObjectMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricSourceApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
func (*ObjectMetricSourceApplyConfiguration) WithTarget ¶
func (b *ObjectMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ObjectMetricSourceApplyConfiguration
WithTarget sets the Target field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Target field is set to the value of the last call.
type ObjectMetricStatusApplyConfiguration ¶
type ObjectMetricStatusApplyConfiguration struct {
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
// DescribedObject specifies the descriptions of a object,such as kind,name apiVersion
DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"`
}
ObjectMetricStatusApplyConfiguration represents a declarative configuration of the ObjectMetricStatus type for use with apply.
ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
func ObjectMetricStatus ¶
func ObjectMetricStatus() *ObjectMetricStatusApplyConfiguration
ObjectMetricStatusApplyConfiguration constructs a declarative configuration of the ObjectMetricStatus type for use with apply.
func (*ObjectMetricStatusApplyConfiguration) WithCurrent ¶
func (b *ObjectMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ObjectMetricStatusApplyConfiguration
WithCurrent sets the Current field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Current field is set to the value of the last call.
func (*ObjectMetricStatusApplyConfiguration) WithDescribedObject ¶
func (b *ObjectMetricStatusApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricStatusApplyConfiguration
WithDescribedObject sets the DescribedObject field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DescribedObject field is set to the value of the last call.
func (*ObjectMetricStatusApplyConfiguration) WithMetric ¶
func (b *ObjectMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricStatusApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
type PodsMetricSourceApplyConfiguration ¶
type PodsMetricSourceApplyConfiguration struct {
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// target specifies the target value for the given metric
Target *MetricTargetApplyConfiguration `json:"target,omitempty"`
}
PodsMetricSourceApplyConfiguration represents a declarative configuration of the PodsMetricSource type for use with apply.
PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
func PodsMetricSource ¶
func PodsMetricSource() *PodsMetricSourceApplyConfiguration
PodsMetricSourceApplyConfiguration constructs a declarative configuration of the PodsMetricSource type for use with apply.
func (*PodsMetricSourceApplyConfiguration) WithMetric ¶
func (b *PodsMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricSourceApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
func (*PodsMetricSourceApplyConfiguration) WithTarget ¶
func (b *PodsMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *PodsMetricSourceApplyConfiguration
WithTarget sets the Target field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Target field is set to the value of the last call.
type PodsMetricStatusApplyConfiguration ¶
type PodsMetricStatusApplyConfiguration struct {
// metric identifies the target metric by name and selector
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
}
PodsMetricStatusApplyConfiguration represents a declarative configuration of the PodsMetricStatus type for use with apply.
PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
func PodsMetricStatus ¶
func PodsMetricStatus() *PodsMetricStatusApplyConfiguration
PodsMetricStatusApplyConfiguration constructs a declarative configuration of the PodsMetricStatus type for use with apply.
func (*PodsMetricStatusApplyConfiguration) WithCurrent ¶
func (b *PodsMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *PodsMetricStatusApplyConfiguration
WithCurrent sets the Current field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Current field is set to the value of the last call.
func (*PodsMetricStatusApplyConfiguration) WithMetric ¶
func (b *PodsMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricStatusApplyConfiguration
WithMetric sets the Metric field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Metric field is set to the value of the last call.
type ResourceMetricSourceApplyConfiguration ¶
type ResourceMetricSourceApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// target specifies the target value for the given metric
Target *MetricTargetApplyConfiguration `json:"target,omitempty"`
}
ResourceMetricSourceApplyConfiguration represents a declarative configuration of the ResourceMetricSource type for use with apply.
ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set.
func ResourceMetricSource ¶
func ResourceMetricSource() *ResourceMetricSourceApplyConfiguration
ResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ResourceMetricSource type for use with apply.
func (*ResourceMetricSourceApplyConfiguration) WithName ¶
func (b *ResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricSourceApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*ResourceMetricSourceApplyConfiguration) WithTarget ¶
func (b *ResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ResourceMetricSourceApplyConfiguration
WithTarget sets the Target field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Target field is set to the value of the last call.
type ResourceMetricStatusApplyConfiguration ¶
type ResourceMetricStatusApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
}
ResourceMetricStatusApplyConfiguration represents a declarative configuration of the ResourceMetricStatus type for use with apply.
ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
func ResourceMetricStatus ¶
func ResourceMetricStatus() *ResourceMetricStatusApplyConfiguration
ResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ResourceMetricStatus type for use with apply.
func (*ResourceMetricStatusApplyConfiguration) WithCurrent ¶
func (b *ResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ResourceMetricStatusApplyConfiguration
WithCurrent sets the Current field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Current field is set to the value of the last call.
func (*ResourceMetricStatusApplyConfiguration) WithName ¶
func (b *ResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricStatusApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
Source Files ¶
containerresourcemetricsource.go containerresourcemetricstatus.go crossversionobjectreference.go externalmetricsource.go externalmetricstatus.go horizontalpodautoscaler.go horizontalpodautoscalerbehavior.go horizontalpodautoscalercondition.go horizontalpodautoscalerspec.go horizontalpodautoscalerstatus.go hpascalingpolicy.go hpascalingrules.go metricidentifier.go metricspec.go metricstatus.go metrictarget.go metricvaluestatus.go objectmetricsource.go objectmetricstatus.go podsmetricsource.go podsmetricstatus.go resourcemetricsource.go resourcemetricstatus.go
- Version
- v0.35.0-alpha.2
- Published
- Oct 22, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 4 minutes ago –
Tools for package owners.