v1alpha2

package
v0.0.0-...-f07a332 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the datadoghq v1alpha2 API group +kubebuilder:object:generate=true +groupName=datadoghq.com

Index

Constants

View Source
const (
	// DatadogPodAutoscalerApplyModeApply allows the controller to apply all recommendations (regular and manual)
	DatadogPodAutoscalerApplyModeApply DatadogPodAutoscalerApplyMode = "Apply"

	// DatadogPodAutoscalerApplyModePreview doesn't allow the controller to apply any recommendations
	DatadogPodAutoscalerApplyModePreview DatadogPodAutoscalerApplyMode = "Preview"

	// DatadogPodAutoscalerFallbackDirectionScaleUp allows the controller to apply fallback recommendations to scale up the target resource.
	DatadogPodAutoscalerFallbackDirectionScaleUp DatadogPodAutoscalerFallbackDirection = "ScaleUp"

	// DatadogPodAutoscalerFallbackDirectionScaleDown allows the controller to apply fallback recommendations to scale down the target resource.
	DatadogPodAutoscalerFallbackDirectionScaleDown DatadogPodAutoscalerFallbackDirection = "ScaleDown"

	// DatadogPodAutoscalerFallbackDirectionAll allows the controller to apply fallback recommendations to scale up or down the target resource.
	DatadogPodAutoscalerFallbackDirectionAll DatadogPodAutoscalerFallbackDirection = "All"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "datadoghq.com", Version: "v1alpha2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func NewDatadogPodAutoscalerToV1Alpha1

func NewDatadogPodAutoscalerToV1Alpha1(in *DatadogPodAutoscaler) *v1alpha1.DatadogPodAutoscaler

Types

type DatadogFallbackPolicy

type DatadogFallbackPolicy struct {
	// Horizontal configures the behavior during horizontal fallback mode.
	// +optional
	// +kubebuilder:default={}
	Horizontal DatadogPodAutoscalerHorizontalFallbackPolicy `json:"horizontal,omitempty"`
}

DatadogFallbackPolicy configures the behavior during fallback mode.

func (*DatadogFallbackPolicy) DeepCopy

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

func (*DatadogFallbackPolicy) DeepCopyInto

func (in *DatadogFallbackPolicy) DeepCopyInto(out *DatadogFallbackPolicy)

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

type DatadogPodAutoscaler

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

	Spec   DatadogPodAutoscalerSpec          `json:"spec,omitempty"`
	Status common.DatadogPodAutoscalerStatus `json:"status,omitempty"`
}

DatadogPodAutoscaler is the Schema for the datadogpodautoscalers API. +kubebuilder:object:root=true +kubebuilder:resource:shortName=dpa +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Apply Mode",type="string",JSONPath=".spec.applyPolicy.mode" +kubebuilder:printcolumn:name="Active",type="string",JSONPath=".status.conditions[?(@.type=='Active')].status" +kubebuilder:printcolumn:name="In Error",type="string",JSONPath=".status.conditions[?(@.type=='Error')].status" +kubebuilder:printcolumn:name="Desired Replicas",type="integer",JSONPath=".status.horizontal.target.desiredReplicas" +kubebuilder:printcolumn:name="Generated",type="date",JSONPath=".status.horizontal.target.generatedAt" +kubebuilder:printcolumn:name="Able to Scale",type="string",JSONPath=".status.conditions[?(@.type=='HorizontalAbleToScale')].status" +kubebuilder:printcolumn:name="Last Scale",type="date",JSONPath=".status.horizontal.lastAction.time" +kubebuilder:printcolumn:name="Target CPU Req",type="string",JSONPath=".status.vertical.target.podCPURequest" +kubebuilder:printcolumn:name="Target Memory Req",type="string",JSONPath=".status.vertical.target.podMemoryRequest" +kubebuilder:printcolumn:name="Generated",type="date",JSONPath=".status.vertical.target.generatedAt" +kubebuilder:printcolumn:name="Able to Apply",type="string",JSONPath=".status.conditions[?(@.type=='VerticalAbleToApply')].status" +kubebuilder:printcolumn:name="Last Trigger",type="date",JSONPath=".status.vertical.lastAction.time" +kubebuilder:storageversion

func NewDatadogPodAutoscalerFromV1Alpha1

func NewDatadogPodAutoscalerFromV1Alpha1(in *v1alpha1.DatadogPodAutoscaler) *DatadogPodAutoscaler

func (*DatadogPodAutoscaler) DeepCopy

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

func (*DatadogPodAutoscaler) DeepCopyInto

func (in *DatadogPodAutoscaler) DeepCopyInto(out *DatadogPodAutoscaler)

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

func (*DatadogPodAutoscaler) DeepCopyObject

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

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

type DatadogPodAutoscalerApplyMode

type DatadogPodAutoscalerApplyMode string

DatadogPodAutoscalerApplyMode specifies if the controller should apply recommendations. +kubebuilder:validation:Enum:=Apply;Preview

type DatadogPodAutoscalerApplyPolicy

type DatadogPodAutoscalerApplyPolicy struct {
	// Mode determines recommendations that should be applied by the controller:
	// - Apply: Apply all recommendations.
	// - Preview: Recommendations are received and visible through .Status, but the controller does not apply them.
	// It's also possible to selectively deactivate upscale, downscale or update actions thanks to the `ScaleUp`, `ScaleDown` and `Update` fields.
	// +optional
	// +kubebuilder:default=Apply
	Mode DatadogPodAutoscalerApplyMode `json:"mode"`

	// Update defines the policy for updating the target resource.
	Update *common.DatadogPodAutoscalerUpdatePolicy `json:"update,omitempty"`

	// ScaleUp defines the policy to scale up the target resource.
	ScaleUp *common.DatadogPodAutoscalerScalingPolicy `json:"scaleUp,omitempty"`

	// ScaleDown defines the policy to scale down the target resource.
	ScaleDown *common.DatadogPodAutoscalerScalingPolicy `json:"scaleDown,omitempty"`
}

DatadogPodAutoscalerApplyPolicy defines how recommendations should be applied.

func (*DatadogPodAutoscalerApplyPolicy) DeepCopy

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

func (*DatadogPodAutoscalerApplyPolicy) DeepCopyInto

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

type DatadogPodAutoscalerClusterProfile

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

	Spec   DatadogPodAutoscalerProfileSpec   `json:"spec,omitempty"`
	Status DatadogPodAutoscalerProfileStatus `json:"status,omitempty"`
}

DatadogPodAutoscalerClusterProfile is the Schema for the datadogpodautoscalerclusterprofiles API. +kubebuilder:object:root=true +kubebuilder:resource:shortName=dpacp,scope=Cluster +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Valid",type="string",JSONPath=".status.conditions[?(@.type=='Valid')].status" +kubebuilder:printcolumn:name="Controlled Autoscalers",type="integer",JSONPath=".status.controlledAutoscalers" +kubebuilder:printcolumn:name="Apply Mode",type="string",JSONPath=".spec.template.applyPolicy.mode" +kubebuilder:printcolumn:name="Min Replicas",type="integer",JSONPath=".spec.template.constraints.minReplicas" +kubebuilder:printcolumn:name="Max Replicas",type="integer",JSONPath=".spec.template.constraints.maxReplicas" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*DatadogPodAutoscalerClusterProfile) DeepCopy

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

func (*DatadogPodAutoscalerClusterProfile) DeepCopyInto

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

func (*DatadogPodAutoscalerClusterProfile) DeepCopyObject

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

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

type DatadogPodAutoscalerClusterProfileList

type DatadogPodAutoscalerClusterProfileList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatadogPodAutoscalerClusterProfile `json:"items"`
}

DatadogPodAutoscalerClusterProfileList contains a list of DatadogPodAutoscalerClusterProfiles. +kubebuilder:object:root=true

func (*DatadogPodAutoscalerClusterProfileList) DeepCopy

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

func (*DatadogPodAutoscalerClusterProfileList) DeepCopyInto

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

func (*DatadogPodAutoscalerClusterProfileList) DeepCopyObject

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

type DatadogPodAutoscalerFallbackDirection

type DatadogPodAutoscalerFallbackDirection string

DatadogPodAutoscalerFallbackDirection specifies the direction that fallback recommendations can be applied. +kubebuilder:validation:Enum:=ScaleUp;ScaleDown;All

type DatadogPodAutoscalerHorizontalFallbackPolicy

type DatadogPodAutoscalerHorizontalFallbackPolicy struct {
	// Enabled determines whether recommendations should be applied by the controller:
	// +optional
	// +kubebuilder:default=true
	Enabled bool `json:"enabled"`

	// Triggers defines the triggers that will generate recommendations.
	// +optional
	// +kubebuilder:default={}
	Triggers HorizontalFallbackTriggers `json:"triggers,omitempty"`

	// Direction determines the direction that recommendations should be applied.
	// +optional
	// +kubebuilder:default=ScaleUp
	Direction DatadogPodAutoscalerFallbackDirection `json:"direction,omitempty"`

	// Objectives are the objectives to reach and maintain for the target resource in fallback mode.
	// If not set, the regular objectives will be used.
	// +listType=atomic
	Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"`
}

DatadogPodAutoscalerHorizontalFallbackPolicy defines how recommendations should be applied in fallback mode.

func (*DatadogPodAutoscalerHorizontalFallbackPolicy) DeepCopy

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

func (*DatadogPodAutoscalerHorizontalFallbackPolicy) DeepCopyInto

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

type DatadogPodAutoscalerList

type DatadogPodAutoscalerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatadogPodAutoscaler `json:"items"`
}

DatadogPodAutoscalerList contains a list of DatadogPodAutoscalers

func (*DatadogPodAutoscalerList) DeepCopy

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

func (*DatadogPodAutoscalerList) DeepCopyInto

func (in *DatadogPodAutoscalerList) DeepCopyInto(out *DatadogPodAutoscalerList)

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

func (*DatadogPodAutoscalerList) DeepCopyObject

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

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

type DatadogPodAutoscalerProfileConditionType

type DatadogPodAutoscalerProfileConditionType string

DatadogPodAutoscalerProfileConditionType represents a condition type for DatadogPodAutoscalerProfile.

const (
	// DatadogPodAutoscalerProfilValidCondition indicates whether the profile is valid and can be used to autoscale.
	DatadogPodAutoscalerProfileValidCondition DatadogPodAutoscalerProfileConditionType = "Valid"
)

type DatadogPodAutoscalerProfileSpec

type DatadogPodAutoscalerProfileSpec struct {
	// Template contains the autoscaling behavior configuration to apply to managed DatadogPodAutoscalers.
	Template DatadogPodAutoscalerTemplate `json:"template"`
}

DatadogPodAutoscalerProfileSpec defines the desired state of DatadogPodAutoscalerProfile.

func (*DatadogPodAutoscalerProfileSpec) DeepCopy

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

func (*DatadogPodAutoscalerProfileSpec) DeepCopyInto

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

type DatadogPodAutoscalerProfileStatus

type DatadogPodAutoscalerProfileStatus struct {
	// Conditions represents the latest available observations of the profile's current state.
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// TemplateHash is the stored hash of the DatadogPodAutoscalerProfile template.
	// +optional
	TemplateHash string `json:"templateHash,omitempty"`

	// ControlledAutoscalers is the number of DatadogPodAutoscaler objects managed by this profile.
	// +optional
	ControlledAutoscalers int32 `json:"controlledAutoscalers"`
}

DatadogPodAutoscalerProfileStatus defines the observed state of DatadogPodAutoscalerProfile.

func (*DatadogPodAutoscalerProfileStatus) DeepCopy

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

func (*DatadogPodAutoscalerProfileStatus) DeepCopyInto

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

type DatadogPodAutoscalerSpec

type DatadogPodAutoscalerSpec struct {
	// TargetRef is the reference to the resource to scale.
	TargetRef autoscalingv2.CrossVersionObjectReference `json:"targetRef"`

	// Owner defines the source of truth for this object (local or remote).
	// Value must be set when a DatadogPodAutoscaler object is created.
	Owner common.DatadogPodAutoscalerOwner `json:"owner"`

	// RemoteVersion is the version of the .Spec currently stored in this object.
	// This is only set if the owner is Remote.
	RemoteVersion *uint64 `json:"remoteVersion,omitempty"`

	// ApplyPolicy defines how recommendations should be applied.
	// +optional
	// +kubebuilder:default={}
	ApplyPolicy *DatadogPodAutoscalerApplyPolicy `json:"applyPolicy,omitempty"`

	// Objectives are the objectives to reach and maintain for the target resource.
	// Default to a single objective to maintain 80% POD CPU utilization.
	// +listType=atomic
	Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"`

	// Fallback defines how recommendations should be applied when in fallback mode.
	// +optional
	// +kubebuilder:default={}
	Fallback *DatadogFallbackPolicy `json:"fallback,omitempty"`

	// Constraints defines constraints that should always be respected.
	Constraints *common.DatadogPodAutoscalerConstraints `json:"constraints,omitempty"`

	// Options defines optional behavior modifications for the autoscaler.
	// +optional
	Options *common.DatadogPodAutoscalerOptions `json:"options,omitempty"`
}

DatadogPodAutoscalerSpec defines the desired state of DatadogPodAutoscaler

func (*DatadogPodAutoscalerSpec) DeepCopy

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

func (*DatadogPodAutoscalerSpec) DeepCopyInto

func (in *DatadogPodAutoscalerSpec) DeepCopyInto(out *DatadogPodAutoscalerSpec)

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

type DatadogPodAutoscalerTemplate

type DatadogPodAutoscalerTemplate struct {
	// ApplyPolicy defines how recommendations should be applied.
	// +optional
	// +kubebuilder:default={}
	ApplyPolicy *DatadogPodAutoscalerApplyPolicy `json:"applyPolicy,omitempty"`

	// Objectives are the objectives to reach and maintain for the target resource.
	// Default to a single objective to maintain 80% POD CPU utilization.
	// +listType=atomic
	Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"`

	// Fallback defines how recommendations should be applied when in fallback mode.
	// +optional
	// +kubebuilder:default={}
	Fallback *DatadogFallbackPolicy `json:"fallback,omitempty"`

	// Constraints defines constraints that should always be respected.
	Constraints *common.DatadogPodAutoscalerConstraints `json:"constraints,omitempty"`

	// Options defines optional behavior modifications for the autoscaler.
	// +optional
	Options *common.DatadogPodAutoscalerOptions `json:"options,omitempty"`
}

DatadogPodAutoscalerTemplate contains the autoscaling behavior configuration that can be shared across multiple autoscalers via DatadogPodAutoscalerProfile.

func (*DatadogPodAutoscalerTemplate) DeepCopy

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

func (*DatadogPodAutoscalerTemplate) DeepCopyInto

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

type HorizontalFallbackTriggers

type HorizontalFallbackTriggers struct {
	// StaleRecommendationThresholdSeconds defines the time window the controller will wait after detecting an error before applying recommendations.
	// +optional
	// +kubebuilder:default=600
	// +kubebuilder:validation:Minimum=100
	// +kubebuilder:validation:Maximum=3600
	StaleRecommendationThresholdSeconds int32 `json:"staleRecommendationThresholdSeconds,omitempty"`
}

HorizontalFallbackTriggers defines the triggers that will cause local fallback to be enabled.

func (*HorizontalFallbackTriggers) DeepCopy

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

func (*HorizontalFallbackTriggers) DeepCopyInto

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

Jump to

Keyboard shortcuts

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