Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the datadoghq v1alpha2 API group +kubebuilder:object:generate=true +groupName=datadoghq.com
Index ¶
- Constants
- Variables
- func ConvertDatadogPodAutoscalerSpecToV1Alpha1(in DatadogPodAutoscalerSpec) v1alpha1.DatadogPodAutoscalerSpec
- func NewDatadogPodAutoscalerToV1Alpha1(in *DatadogPodAutoscaler) *v1alpha1.DatadogPodAutoscaler
- type DatadogFallbackPolicy
- type DatadogPodAutoscaler
- type DatadogPodAutoscalerApplyMode
- type DatadogPodAutoscalerApplyPolicy
- type DatadogPodAutoscalerClusterProfile
- type DatadogPodAutoscalerClusterProfileList
- type DatadogPodAutoscalerFallbackDirection
- type DatadogPodAutoscalerHorizontalFallbackPolicy
- type DatadogPodAutoscalerList
- type DatadogPodAutoscalerProfileConditionType
- type DatadogPodAutoscalerProfileSpec
- type DatadogPodAutoscalerProfileStatus
- type DatadogPodAutoscalerSpec
- type DatadogPodAutoscalerTemplate
- type HorizontalFallbackTriggers
Constants ¶
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 ¶
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 ConvertDatadogPodAutoscalerSpecToV1Alpha1 ¶
func ConvertDatadogPodAutoscalerSpecToV1Alpha1(in DatadogPodAutoscalerSpec) v1alpha1.DatadogPodAutoscalerSpec
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 ¶
func (in *DatadogFallbackPolicy) DeepCopy() *DatadogFallbackPolicy
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 ¶
func (in *DatadogPodAutoscaler) DeepCopy() *DatadogPodAutoscaler
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 ¶
func (in *DatadogPodAutoscalerApplyPolicy) DeepCopy() *DatadogPodAutoscalerApplyPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerApplyPolicy.
func (*DatadogPodAutoscalerApplyPolicy) DeepCopyInto ¶
func (in *DatadogPodAutoscalerApplyPolicy) DeepCopyInto(out *DatadogPodAutoscalerApplyPolicy)
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 ¶
func (in *DatadogPodAutoscalerClusterProfile) DeepCopy() *DatadogPodAutoscalerClusterProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerClusterProfile.
func (*DatadogPodAutoscalerClusterProfile) DeepCopyInto ¶
func (in *DatadogPodAutoscalerClusterProfile) DeepCopyInto(out *DatadogPodAutoscalerClusterProfile)
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 ¶
func (in *DatadogPodAutoscalerClusterProfileList) DeepCopy() *DatadogPodAutoscalerClusterProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerClusterProfileList.
func (*DatadogPodAutoscalerClusterProfileList) DeepCopyInto ¶
func (in *DatadogPodAutoscalerClusterProfileList) DeepCopyInto(out *DatadogPodAutoscalerClusterProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatadogPodAutoscalerClusterProfileList) DeepCopyObject ¶
func (in *DatadogPodAutoscalerClusterProfileList) DeepCopyObject() runtime.Object
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 ¶
func (in *DatadogPodAutoscalerHorizontalFallbackPolicy) DeepCopy() *DatadogPodAutoscalerHorizontalFallbackPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerHorizontalFallbackPolicy.
func (*DatadogPodAutoscalerHorizontalFallbackPolicy) DeepCopyInto ¶
func (in *DatadogPodAutoscalerHorizontalFallbackPolicy) DeepCopyInto(out *DatadogPodAutoscalerHorizontalFallbackPolicy)
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 ¶
func (in *DatadogPodAutoscalerList) DeepCopy() *DatadogPodAutoscalerList
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 ¶
func (in *DatadogPodAutoscalerProfileSpec) DeepCopy() *DatadogPodAutoscalerProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerProfileSpec.
func (*DatadogPodAutoscalerProfileSpec) DeepCopyInto ¶
func (in *DatadogPodAutoscalerProfileSpec) DeepCopyInto(out *DatadogPodAutoscalerProfileSpec)
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 ¶
func (in *DatadogPodAutoscalerProfileStatus) DeepCopy() *DatadogPodAutoscalerProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerProfileStatus.
func (*DatadogPodAutoscalerProfileStatus) DeepCopyInto ¶
func (in *DatadogPodAutoscalerProfileStatus) DeepCopyInto(out *DatadogPodAutoscalerProfileStatus)
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 ConvertDatadogPodAutoscalerSpecFromV1Alpha1 ¶
func ConvertDatadogPodAutoscalerSpecFromV1Alpha1(in v1alpha1.DatadogPodAutoscalerSpec) DatadogPodAutoscalerSpec
func (*DatadogPodAutoscalerSpec) DeepCopy ¶
func (in *DatadogPodAutoscalerSpec) DeepCopy() *DatadogPodAutoscalerSpec
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 ¶
func (in *DatadogPodAutoscalerTemplate) DeepCopy() *DatadogPodAutoscalerTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatadogPodAutoscalerTemplate.
func (*DatadogPodAutoscalerTemplate) DeepCopyInto ¶
func (in *DatadogPodAutoscalerTemplate) DeepCopyInto(out *DatadogPodAutoscalerTemplate)
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 ¶
func (in *HorizontalFallbackTriggers) DeepCopy() *HorizontalFallbackTriggers
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalFallbackTriggers.
func (*HorizontalFallbackTriggers) DeepCopyInto ¶
func (in *HorizontalFallbackTriggers) DeepCopyInto(out *HorizontalFallbackTriggers)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.