common

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: 4 Imported by: 2 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

Index

Constants

View Source
const (
	// AgentDeploymentNameLabelKey label key use to link a Resource to a DatadogAgent
	AgentDeploymentNameLabelKey = "agent.datadoghq.com/name"
	// AgentDeploymentComponentLabelKey label key use to know with component is it
	AgentDeploymentComponentLabelKey = "agent.datadoghq.com/component"
	// DatadogAgentNameLabelKey is used to know the name of the DatadogAgent
	DatadogAgentNameLabelKey = "agent.datadoghq.com/datadogagent"
	// UpdateMetadataAnnotationKey is used when the workload metadata should be updated
	UpdateMetadataAnnotationKey = "agent.datadoghq.com/update-metadata"
	// HelmMigrationAnnotationKey is used when a Helm-managed workload should be migrated
	HelmMigrationAnnotationKey = "agent.datadoghq.com/helm-migration"
)

// Labels

View Source
const (
	CreateStrategyEnabled = "DD_DAP_CREATE_STRATEGY_ENABLED"
)

DatadogAgentProfile env var names

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentContainerName

type AgentContainerName string

AgentContainerName is the name of a container inside an Agent component

const (
	// InitVolumeContainerName is the name of the Init Volume init container
	InitVolumeContainerName AgentContainerName = "init-volume"
	// InitConfigContainerName is the name of the Init config Volume init container
	InitConfigContainerName AgentContainerName = "init-config"
	// SeccompSetupContainerName is the name of the Seccomp Setup init container
	SeccompSetupContainerName AgentContainerName = "seccomp-setup"
	// HostProfilerSeccompSetupContainerName is the name of the host-profiler seccomp setup init container
	HostProfilerSeccompSetupContainerName AgentContainerName = "host-profiler-seccomp-setup"

	// UnprivilegedSingleAgentContainerName is the name of a container which may run
	// any combination of Core, Trace and Process Agent processes in a single container.
	UnprivilegedSingleAgentContainerName AgentContainerName = "unprivileged-single-agent"
	// CoreAgentContainerName is the name of the Core Agent container
	CoreAgentContainerName AgentContainerName = "agent"
	// TraceAgentContainerName is the name of the Trace Agent container
	TraceAgentContainerName AgentContainerName = "trace-agent"
	// ProcessAgentContainerName is the name of the Process Agent container
	ProcessAgentContainerName AgentContainerName = "process-agent"
	// SecurityAgentContainerName is the name of the Security Agent container
	SecurityAgentContainerName AgentContainerName = "security-agent"
	// SystemProbeContainerName is the name of the System Probe container
	SystemProbeContainerName AgentContainerName = "system-probe"
	// OtelAgent is the name of the OTel container
	OtelAgent AgentContainerName = "otel-agent"
	// HostProfiler is the name of the Host Profiler container
	HostProfiler AgentContainerName = "host-profiler"
	// AgentDataPlaneContainerName is the name of the Agent Data Plane container
	AgentDataPlaneContainerName AgentContainerName = "agent-data-plane"
	// AgentCheckRunnerContainerName is the name of the Agent Check Runner container
	AgentCheckRunnerContainerName AgentContainerName = "agent-check-runner"
	// FlightRecorderContainerName is the name of the Flight Recorder container
	FlightRecorderContainerName AgentContainerName = "flightrecorder"
	// PrivateActionRunnerContainerName is the name of the Private Action Runner container
	PrivateActionRunnerContainerName AgentContainerName = "private-action-runner"
	// AllContainers is used internally to reference all containers in the pod
	AllContainers AgentContainerName = "all"
	// ClusterAgentContainerName is the name of the Cluster Agent container
	ClusterAgentContainerName AgentContainerName = "cluster-agent"
	// ClusterChecksRunnersContainerName is the name of the Agent container in Cluster Checks Runners
	ClusterChecksRunnersContainerName AgentContainerName = "agent"

	// FIPSProxyContainerName is the name of the FIPS Proxy container
	FIPSProxyContainerName AgentContainerName = "fips-proxy"
)

type DatadogPodAutoscalerApmMetricsStat

type DatadogPodAutoscalerApmMetricsStat string

DatadogPodAutoscalerApmMetricsStat represents the statistic to compute for an APM metrics query. +kubebuilder:validation:Enum:=error_rate;errors;errors_per_second;hits;hits_per_second;apdex;latency_avg;latency_max;latency_p50;latency_p75;latency_p90;latency_p95;latency_p99;latency_p999;latency_distribution;total_time

const (
	APM_METRIC_STAT_ERROR_RATE           DatadogPodAutoscalerApmMetricsStat = "error_rate"
	APM_METRIC_STAT_ERRORS               DatadogPodAutoscalerApmMetricsStat = "errors"
	APM_METRIC_STAT_ERRORS_PER_SECOND    DatadogPodAutoscalerApmMetricsStat = "errors_per_second"
	APM_METRIC_STAT_HITS                 DatadogPodAutoscalerApmMetricsStat = "hits"
	APM_METRIC_STAT_HITS_PER_SECOND      DatadogPodAutoscalerApmMetricsStat = "hits_per_second"
	APM_METRIC_STAT_APDEX                DatadogPodAutoscalerApmMetricsStat = "apdex"
	APM_METRIC_STAT_LATENCY_AVG          DatadogPodAutoscalerApmMetricsStat = "latency_avg"
	APM_METRIC_STAT_LATENCY_MAX          DatadogPodAutoscalerApmMetricsStat = "latency_max"
	APM_METRIC_STAT_LATENCY_P50          DatadogPodAutoscalerApmMetricsStat = "latency_p50"
	APM_METRIC_STAT_LATENCY_P75          DatadogPodAutoscalerApmMetricsStat = "latency_p75"
	APM_METRIC_STAT_LATENCY_P90          DatadogPodAutoscalerApmMetricsStat = "latency_p90"
	APM_METRIC_STAT_LATENCY_P95          DatadogPodAutoscalerApmMetricsStat = "latency_p95"
	APM_METRIC_STAT_LATENCY_P99          DatadogPodAutoscalerApmMetricsStat = "latency_p99"
	APM_METRIC_STAT_LATENCY_P999         DatadogPodAutoscalerApmMetricsStat = "latency_p999"
	APM_METRIC_STAT_LATENCY_DISTRIBUTION DatadogPodAutoscalerApmMetricsStat = "latency_distribution"
	APM_METRIC_STAT_TOTAL_TIME           DatadogPodAutoscalerApmMetricsStat = "total_time"
)

type DatadogPodAutoscalerApmMetricsTimeseriesQuery

type DatadogPodAutoscalerApmMetricsTimeseriesQuery struct {
	// Stat defines the statistic to compute for the APM metrics query.
	Stat DatadogPodAutoscalerApmMetricsStat `json:"stat"`

	// Service is the name of the service to query.
	// +optional
	Service string `json:"service,omitempty"`

	// ResourceName is the name of the resource to query.
	// +optional
	ResourceName string `json:"resourceName,omitempty"`

	// ResourceHash is a fingerprint of the resource name that can be used to identify the resource instead of the resource name.
	// +optional
	ResourceHash string `json:"resourceHash,omitempty"`

	// OperationName is the name of the operation to query.
	// +optional
	OperationName string `json:"operationName,omitempty"`

	// GroupBy is the list of tags to group by.
	// +optional
	GroupBy []string `json:"groupBy,omitempty"`

	// QueryFilter is the filter to apply to the query.
	// +optional
	QueryFilter string `json:"queryFilter,omitempty"`

	// SpanKind is the kind of span to query.
	// +optional
	SpanKind string `json:"spanKind,omitempty"`
}

DatadogPodAutoscalerApmMetricsTimeseriesQuery defines an APM metrics query. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerApmMetricsTimeseriesQuery) DeepCopy

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

func (*DatadogPodAutoscalerApmMetricsTimeseriesQuery) DeepCopyInto

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

type DatadogPodAutoscalerCondition

type DatadogPodAutoscalerCondition struct {
	// DatadogPodAutoscalerConditionType is the type of DatadogPodAutoscaler condition.
	Type DatadogPodAutoscalerConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

DatadogPodAutoscalerCondition describes the state of DatadogPodAutoscaler. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerCondition) DeepCopy

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

func (*DatadogPodAutoscalerCondition) DeepCopyInto

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

type DatadogPodAutoscalerConditionType

type DatadogPodAutoscalerConditionType string

DatadogPodAutoscalerConditionType is the type used to represent a DatadogPodAutoscaler condition

const (
	// DatadogPodAutoscalerErrorCondition is true when a global error is encountered processing this DatadogPodAutoscaler.
	DatadogPodAutoscalerErrorCondition DatadogPodAutoscalerConditionType = "Error"

	// DatadogPodAutoscalerActiveCondition is true when the DatadogPodAutoscaler can be used for autoscaling.
	DatadogPodAutoscalerActiveCondition DatadogPodAutoscalerConditionType = "Active"

	// DatadogPodAutoscalerHorizontalAbleToRecommendCondition is true when a horizontal recommendation can be received from Datadog.
	DatadogPodAutoscalerHorizontalAbleToRecommendCondition DatadogPodAutoscalerConditionType = "HorizontalAbleToRecommend"

	// DatadogPodAutoscalerHorizontalAbleToScaleCondition is true when horizontal scaling is working correctly.
	DatadogPodAutoscalerHorizontalAbleToScaleCondition DatadogPodAutoscalerConditionType = "HorizontalAbleToScale"

	// DatadogPodAutoscalerHorizontalScalingLimitedCondition is true when horizontal scaling is limited by constraints.
	DatadogPodAutoscalerHorizontalScalingLimitedCondition DatadogPodAutoscalerConditionType = "HorizontalScalingLimited"

	// DatadogPodAutoscalerVerticalAbleToRecommendCondition is true when a vertical recommendation can be received from Datadog.
	DatadogPodAutoscalerVerticalAbleToRecommendCondition DatadogPodAutoscalerConditionType = "VerticalAbleToRecommend"

	// DatadogPodAutoscalerVerticalAbleToApply is true when the targetRef can be rolled out to pick up new resources.
	DatadogPodAutoscalerVerticalAbleToApply DatadogPodAutoscalerConditionType = "VerticalAbleToApply"

	// DatadogPodAutoscalerVerticalScalingLimitedCondition is true when vertical scaling is limited by constraints.
	DatadogPodAutoscalerVerticalScalingLimitedCondition DatadogPodAutoscalerConditionType = "VerticalScalingLimited"
)

type DatadogPodAutoscalerConstraints

type DatadogPodAutoscalerConstraints struct {
	// MinReplicas is the lower limit for the number of pod replicas. Needs to be >= 1. Defaults to 1.
	// +kubebuilder:validation:Minimum=1
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// MaxReplicas is the upper limit for the number of POD replicas. Needs to be >= minReplicas.
	// +kubebuilder:validation:Minimum=1
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`

	// Containers defines constraints for the containers.
	// +patchMergeKey=name
	// +patchStrategy=merge
	Containers []DatadogPodAutoscalerContainerConstraints `json:"containers,omitempty"`
}

DatadogPodAutoscalerConstraints defines constraints that should always be respected. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerConstraints) DeepCopy

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

func (*DatadogPodAutoscalerConstraints) DeepCopyInto

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

type DatadogPodAutoscalerContainerConstraints

type DatadogPodAutoscalerContainerConstraints struct {
	// Name is the name of the container. Can be "*" to apply to all containers.
	Name string `json:"name"`

	// Enabled, if false, allows one to disable resource autoscaling for the container. Defaults to true.
	Enabled *bool `json:"enabled,omitempty"`

	// Requests defines the constraints for the requests of the container.
	// WARNING: Deprecated
	// +deprecated: use MinAllowed and MaxAllowed instead
	Requests *DatadogPodAutoscalerContainerResourceConstraints `json:"requests,omitempty"`

	// MinAllowed is the lower limit for the requests of the container.
	// +optional
	MinAllowed corev1.ResourceList `json:"minAllowed,omitempty"`

	// MaxAllowed is the upper limit for the requests of the container.
	// +optional
	MaxAllowed corev1.ResourceList `json:"maxAllowed,omitempty"`

	// Specifies the resources for which recommendations will be computed.
	// If not specified, it defaults to CPU and Memory.
	// If an empty list is provided, no resource will be controlled (equivalent to Enabled=false).
	// +patchStrategy=merge
	ControlledResources []corev1.ResourceName `json:"controlledResources,omitempty"`

	// Specifies whether recommendations are made to Requests and Limits (RequestsAndLimits) or Requests only (RequestsOnly).
	// The default is "RequestsAndLimits".
	ControlledValues *DatadogPodAutoscalerContainerControlledValues `json:"controlledValues,omitempty"`
}

DatadogPodAutoscalerContainerConstraints defines constraints that should always be respected for a container. If no constraints are set, it enables resource scaling for all containers without any constraints. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerContainerConstraints) DeepCopy

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

func (*DatadogPodAutoscalerContainerConstraints) DeepCopyInto

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

type DatadogPodAutoscalerContainerControlledValues

type DatadogPodAutoscalerContainerControlledValues string

DatadogPodAutoscalerContainerControlledValues specifies which resource values should be controlled. +kubebuilder:validation:Enum:=RequestsAndLimits;RequestsOnly;CPURequestsRemoveLimitsMemoryRequestsAndLimits

const (
	// DatadogPodAutoscalerContainerControlledValuesRequestsAndLimits controls both requests and limits for all resources (CPU and Memory).
	DatadogPodAutoscalerContainerControlledValuesRequestsAndLimits DatadogPodAutoscalerContainerControlledValues = "RequestsAndLimits"

	// DatadogPodAutoscalerContainerControlledValuesRequestsOnly controls only requests for all resources (CPU and Memory).
	// Existing limits are left unchanged.
	DatadogPodAutoscalerContainerControlledValuesRequestsOnly DatadogPodAutoscalerContainerControlledValues = "RequestsOnly"

	// DatadogPodAutoscalerContainerControlledValuesCPURequestsRemoveLimitsMemoryRequestsAndLimits applies different strategies per resource:
	// - CPU: only requests are controlled and any existing CPU limit is removed, allowing the container to burst freely and avoid CPU throttling.
	// - Memory: both requests and limits are controlled.
	DatadogPodAutoscalerContainerControlledValuesCPURequestsRemoveLimitsMemoryRequestsAndLimits DatadogPodAutoscalerContainerControlledValues = "CPURequestsRemoveLimitsMemoryRequestsAndLimits"
)

type DatadogPodAutoscalerContainerResourceConstraints

type DatadogPodAutoscalerContainerResourceConstraints struct {
	// MinAllowed is the lower limit for the requests of the container.
	// +optional
	MinAllowed corev1.ResourceList `json:"minAllowed,omitempty"`

	// MaxAllowed is the upper limit for the requests of the container.
	// +optional
	MaxAllowed corev1.ResourceList `json:"maxAllowed,omitempty"`
}

DatadogPodAutoscalerContainerResourceConstraints defines constraints for the resources recommended for a container. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerContainerResourceConstraints) DeepCopy

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

func (*DatadogPodAutoscalerContainerResourceConstraints) DeepCopyInto

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

type DatadogPodAutoscalerContainerResourceObjective

type DatadogPodAutoscalerContainerResourceObjective struct {
	// Name is the name of the resource.
	// +kubebuilder:validation:Enum:=cpu;memory
	Name corev1.ResourceName `json:"name"`

	// Value is the value of the objective
	Value DatadogPodAutoscalerObjectiveValue `json:"value"`

	// Container is the name of the container.
	Container string `json:"container"`
}

DatadogPodAutoscalerContainerResourceObjective defines a container-level resource objective (for instance, CPU Utilization for container named "foo" at 80%) +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerContainerResourceObjective) DeepCopy

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

func (*DatadogPodAutoscalerContainerResourceObjective) DeepCopyInto

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

type DatadogPodAutoscalerContainerResources

type DatadogPodAutoscalerContainerResources struct {
	// Name is the name of the container
	Name string `json:"name"`

	// Limits describes the maximum amount of compute resources allowed.
	// +optional
	Limits corev1.ResourceList `json:"limits,omitempty"`

	// Requests describes the requested amount of compute resources.
	// +optional
	Requests corev1.ResourceList `json:"requests,omitempty"`

	// Runtime holds extensible runtime configuration for the container.
	// +optional
	Runtime *DatadogPodAutoscalerContainerRuntimeValues `json:"runtime,omitempty"`
}

DatadogPodAutoscalerContainerResources defines resource values for a container. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerContainerResources) DeepCopy

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

func (*DatadogPodAutoscalerContainerResources) DeepCopyInto

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

type DatadogPodAutoscalerContainerRuntimeValues

type DatadogPodAutoscalerContainerRuntimeValues struct {
	// Gomemlimit is the GOMEMLIMIT environment variable value for the container.
	// +optional
	Gomemlimit string `json:"gomemlimit,omitempty"`
}

DatadogPodAutoscalerContainerRuntimeValues holds runtime configuration values for a container. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerContainerRuntimeValues) DeepCopy

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

func (*DatadogPodAutoscalerContainerRuntimeValues) DeepCopyInto

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

type DatadogPodAutoscalerCustomQueryObjective

type DatadogPodAutoscalerCustomQueryObjective struct {
	// Request is the timeseries query to use for the objective.
	Request DatadogPodAutoscalerTimeseriesFormulaRequest `json:"request"`

	// Value is the value of the objective
	Value DatadogPodAutoscalerObjectiveValue `json:"value"`

	// Window is the time duration over which the query is computed. It should contain at least one full sample.
	Window metav1.Duration `json:"window"`
}

DatadogPodAutoscalerCustomQueryObjective defines a controller-level objective +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerCustomQueryObjective) DeepCopy

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

func (*DatadogPodAutoscalerCustomQueryObjective) DeepCopyInto

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

type DatadogPodAutoscalerHorizontalAction

type DatadogPodAutoscalerHorizontalAction struct {
	// Time is the timestamp of the action
	Time metav1.Time `json:"time"`

	// FromReplicas is the number of replicas before the action
	FromReplicas int32 `json:"replicas"`

	// ToReplicas is the effective number of replicas after the action
	ToReplicas int32 `json:"toReplicas"`

	// RecommendedReplicas is the original number of replicas recommended by Datadog
	RecommendedReplicas *int32 `json:"recommendedReplicas,omitempty"`

	// LimitedReason is the reason why the action was limited (that is ToReplicas != RecommendedReplicas)
	LimitedReason *string `json:"limitedReason,omitempty"`
}

DatadogPodAutoscalerHorizontalAction represents a horizontal action done by the controller +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerHorizontalAction) DeepCopy

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

func (*DatadogPodAutoscalerHorizontalAction) DeepCopyInto

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

type DatadogPodAutoscalerHorizontalRecommendation

type DatadogPodAutoscalerHorizontalRecommendation struct {
	// Source is the source of the value used to scale the target workload
	// +optional
	Source DatadogPodAutoscalerValueSource `json:"source,omitempty"`

	// GeneratedAt is the timestamp at which the recommendation was generated
	GeneratedAt metav1.Time `json:"generatedAt,omitempty"`

	// Replicas is the recommended number of replicas for the workload
	Replicas int32 `json:"desiredReplicas"`
}

DatadogPodAutoscalerHorizontalRecommendation defines a horizontal scaling recommendation +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerHorizontalRecommendation) DeepCopy

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

func (*DatadogPodAutoscalerHorizontalRecommendation) DeepCopyInto

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

type DatadogPodAutoscalerHorizontalStatus

type DatadogPodAutoscalerHorizontalStatus struct {
	// Target is the current target of the horizontal scaling
	Target *DatadogPodAutoscalerHorizontalRecommendation `json:"target,omitempty"`

	// LastActions are the last successful actions done by the controller
	LastActions []DatadogPodAutoscalerHorizontalAction `json:"lastActions,omitempty"`

	// LastRecommendations stores the most recent recommendations
	LastRecommendations []DatadogPodAutoscalerHorizontalRecommendation `json:"lastRecommendations,omitempty"`
}

DatadogPodAutoscalerHorizontalStatus defines the status of the horizontal scaling +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerHorizontalStatus) DeepCopy

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

func (*DatadogPodAutoscalerHorizontalStatus) DeepCopyInto

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

type DatadogPodAutoscalerMetricsDataSource

type DatadogPodAutoscalerMetricsDataSource string

DatadogPodAutoscalerMetricsDataSource identifies a timeseries query source. +kubebuilder:validation:Enum:=Metrics;ApmMetrics

const (
	// DatadogPodAutoscalerMetricsDataSourceMetrics defines the source of the timeseries query as a standard Datadog metrics query.
	DatadogPodAutoscalerMetricsDataSourceMetrics DatadogPodAutoscalerMetricsDataSource = "Metrics"

	// DatadogPodAutoscalerMetricsDataSourceApmMetrics defines the source of the timeseries query as an APM metrics query.
	DatadogPodAutoscalerMetricsDataSourceApmMetrics DatadogPodAutoscalerMetricsDataSource = "ApmMetrics"
)

type DatadogPodAutoscalerMetricsTimeseriesQuery

type DatadogPodAutoscalerMetricsTimeseriesQuery struct {
	// Classic Datadog metrics query, e.g. "avg:system.cpu.user{*} by {env}".
	// +kubebuilder:validation:MinLength=1
	Query string `json:"query"`
}

DatadogPodAutoscalerMetricsTimeseriesQuery defines a standard Datadog metrics query. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerMetricsTimeseriesQuery) DeepCopy

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

func (*DatadogPodAutoscalerMetricsTimeseriesQuery) DeepCopyInto

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

type DatadogPodAutoscalerObjective

type DatadogPodAutoscalerObjective struct {
	// Type sets the type of the objective.
	Type DatadogPodAutoscalerObjectiveType `json:"type"`

	// PodResource allows to set a pod-level resource objective.
	PodResource *DatadogPodAutoscalerPodResourceObjective `json:"podResource,omitempty"`

	// ContainerResource allows to set a container-level resource objective.
	ContainerResource *DatadogPodAutoscalerContainerResourceObjective `json:"containerResource,omitempty"`

	// CustomQuery allows to set a controller-level objective.
	CustomQuery *DatadogPodAutoscalerCustomQueryObjective `json:"customQuery,omitempty"`
}

DatadogPodAutoscalerObjective defines the objectives to reach and maintain for the target workload. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerObjective) DeepCopy

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

func (*DatadogPodAutoscalerObjective) DeepCopyInto

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

type DatadogPodAutoscalerObjectiveType

type DatadogPodAutoscalerObjectiveType string

DatadogPodAutoscalerObjectiveType defines the type of the objective. +kubebuilder:validation:Enum:=PodResource;ContainerResource;CustomQuery

const (
	// DatadogPodAutoscalerPodResourceObjectiveType allows to set pod-level resource objectives.
	DatadogPodAutoscalerPodResourceObjectiveType DatadogPodAutoscalerObjectiveType = "PodResource"

	// DatadogPodAutoscalerContainerResourceObjectiveType allows to set container-level resource objectives.
	DatadogPodAutoscalerContainerResourceObjectiveType DatadogPodAutoscalerObjectiveType = "ContainerResource"

	// DatadogPodAutoscalerCustomQueryObjectiveType allows to set controller-level objectives.
	DatadogPodAutoscalerCustomQueryObjectiveType DatadogPodAutoscalerObjectiveType = "CustomQuery"
)

type DatadogPodAutoscalerObjectiveValue

type DatadogPodAutoscalerObjectiveValue struct {
	// Type specifies how the value is expressed (possible values: Utilization, AbsoluteValue).
	Type DatadogPodAutoscalerObjectiveValueType `json:"type"`

	// Utilization defines a percentage of the target compared to requested workload
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	Utilization *int32 `json:"utilization,omitempty"`

	// AbsoluteValue defines a target as an absolute value divided by the number of running pods.
	// Use a plain number (e.g., "11" or "11.5").
	// Represented as a resource.Quantity to avoid floating point in CRDs.
	AbsoluteValue *resource.Quantity `json:"absoluteValue,omitempty"`
}

DatadogPodAutoscalerObjectiveValue defines the target value of the objective. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerObjectiveValue) DeepCopy

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

func (*DatadogPodAutoscalerObjectiveValue) DeepCopyInto

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

type DatadogPodAutoscalerObjectiveValueType

type DatadogPodAutoscalerObjectiveValueType string

DatadogPodAutoscalerObjectiveValueType specifies the type of objective value. +kubebuilder:validation:Enum:=Utilization;AbsoluteValue

const (
	// DatadogPodAutoscalerUtilizationObjectiveValueType declares an objective based on a Utilization (percentage, 0-100).
	DatadogPodAutoscalerUtilizationObjectiveValueType DatadogPodAutoscalerObjectiveValueType = "Utilization"
	// DatadogPodAutoscalerAbsoluteValueObjectiveValueType declares an objective based on an AbsoluteValue.
	DatadogPodAutoscalerAbsoluteValueObjectiveValueType DatadogPodAutoscalerObjectiveValueType = "AbsoluteValue"
)

type DatadogPodAutoscalerOptions

type DatadogPodAutoscalerOptions struct {
	// OutOfMemory configures behavior when OOM events are detected.
	// +optional
	OutOfMemory *DatadogPodAutoscalerOutOfMemoryOptions `json:"outOfMemory,omitempty"`

	// Burstable, if true, removes CPU limits from containers while keeping CPU request recommendations,
	// granting the pod a Burstable QoS class and allowing it to consume idle node CPU capacity beyond its requests.
	// If not set, the default value is determined by the Cluster Agent setting autoscaling.workload.options.burstable.
	// +optional
	Burstable *bool `json:"burstable,omitempty"`
}

DatadogPodAutoscalerOptions defines optional behavior modifications for the autoscaler. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerOptions) DeepCopy

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

func (*DatadogPodAutoscalerOptions) DeepCopyInto

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

type DatadogPodAutoscalerOptionsStatus

type DatadogPodAutoscalerOptionsStatus struct {
	// Burstable is the effective value of the burstable setting applied by the autoscaler.
	// When not set in the spec, this reflects the default determined by the Cluster Agent
	// setting autoscaling.workload.options.burstable.
	// +optional
	Burstable *bool `json:"burstable,omitempty"`
}

DatadogPodAutoscalerOptionsStatus reflects the effective options applied by the autoscaler. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerOptionsStatus) DeepCopy

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

func (*DatadogPodAutoscalerOptionsStatus) DeepCopyInto

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

type DatadogPodAutoscalerOutOfMemoryOptions

type DatadogPodAutoscalerOutOfMemoryOptions struct {
	// BumpUpRatio defines the ratio to multiply memory by when OOM is detected.
	// For example, "1.2" means increase memory by 20%.
	// Represented as a resource.Quantity to avoid floating point in CRDs.
	// +optional
	BumpUpRatio *resource.Quantity `json:"bumpUpRatio,omitempty"`
}

DatadogPodAutoscalerOutOfMemoryOptions configures the behavior when out-of-memory events are detected. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerOutOfMemoryOptions) DeepCopy

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

func (*DatadogPodAutoscalerOutOfMemoryOptions) DeepCopyInto

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

type DatadogPodAutoscalerOwner

type DatadogPodAutoscalerOwner string

DatadogPodAutoscalerOwner defines the source of truth for this object (local or remote) +kubebuilder:validation:Enum:=Local;Remote

const (
	// DatadogPodAutoscalerLocalOwner states that this `DatadogPodAutoscaler` object is created/managed outside of the Datadog app.
	DatadogPodAutoscalerLocalOwner DatadogPodAutoscalerOwner = "Local"

	// DatadogPodAutoscalerRemoteOwner states that this `DatadogPodAutoscaler` object is created/managed in the Datadog app.
	DatadogPodAutoscalerRemoteOwner DatadogPodAutoscalerOwner = "Remote"
)

type DatadogPodAutoscalerPodResourceObjective

type DatadogPodAutoscalerPodResourceObjective struct {
	// Name is the name of the resource.
	// +kubebuilder:validation:Enum:=cpu;memory
	Name corev1.ResourceName `json:"name"`

	// Value is the value of the objective.
	Value DatadogPodAutoscalerObjectiveValue `json:"value"`
}

DatadogPodAutoscalerPodResourceObjective defines a pod-level resource objective (for instance, CPU Utilization at 80%) For pod-level objectives, resources are the sum of all containers resources. Utilization is computed from sum(usage) / sum(requests). +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerPodResourceObjective) DeepCopy

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

func (*DatadogPodAutoscalerPodResourceObjective) DeepCopyInto

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

type DatadogPodAutoscalerScalingPolicy

type DatadogPodAutoscalerScalingPolicy struct {
	// Strategy is used to specify which policy should be used.
	// If not set, the default value Max is used.
	// +optional
	Strategy *DatadogPodAutoscalerScalingStrategySelect `json:"strategy,omitempty"`

	// Rules is a list of potential scaling polices which can be used during scaling.
	// At least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid
	// +listType=atomic
	// +optional
	Rules []DatadogPodAutoscalerScalingRule `json:"rules,omitempty"`

	// StabilizationWindowSeconds is the number of seconds the controller should lookback at previous recommendations
	// before deciding to apply a new one. Defaults to 0.
	// +optional
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=3600
	StabilizationWindowSeconds int32 `json:"stabilizationWindowSeconds,omitempty"`
}

DatadogPodAutoscalerScalingPolicy defines the policy to scale the target workload. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerScalingPolicy) DeepCopy

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

func (*DatadogPodAutoscalerScalingPolicy) DeepCopyInto

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

type DatadogPodAutoscalerScalingRule

type DatadogPodAutoscalerScalingRule struct {
	// Type is used to specify the scaling policy.
	Type DatadogPodAutoscalerScalingRuleType `json:"type"`

	// Value contains the amount of change which is permitted by the policy.
	// Setting it to 0 will prevent any scaling in this direction.
	// +kubebuilder:validation:Minimum=0
	Value int32 `json:"value"`

	// 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 3600 (1 hour).
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=3600
	PeriodSeconds int32 `json:"periodSeconds"`
}

DatadogPodAutoscalerScalingRule defines rules for horizontal scaling that should be true for a certain amount of time. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerScalingRule) DeepCopy

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

func (*DatadogPodAutoscalerScalingRule) DeepCopyInto

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

type DatadogPodAutoscalerScalingRuleType

type DatadogPodAutoscalerScalingRuleType string

DatadogPodAutoscalerScalingRuleType defines how a scaling rule value should be interpreted. +kubebuilder:validation:Enum:=Pods;Percent

const (
	// DatadogPodAutoscalerPodsScalingRuleType specifies a change in the absolute number of pods compared to the starting number of pods.
	DatadogPodAutoscalerPodsScalingRuleType DatadogPodAutoscalerScalingRuleType = "Pods"

	// DatadogPodAutoscalerPercentScalingRuleType specifies a relative amount of change compared to the starting number of pods.
	DatadogPodAutoscalerPercentScalingRuleType DatadogPodAutoscalerScalingRuleType = "Percent"
)

type DatadogPodAutoscalerScalingStrategySelect

type DatadogPodAutoscalerScalingStrategySelect string

DatadogPodAutoscalerScalingStrategySelect is used to specify which policy should be used while scaling in a certain direction +kubebuilder:validation:Enum:=Max;Min;Disabled

const (
	// DatadogPodAutoscalerMaxChangeStrategySelect selects the policy with the highest possible change.
	DatadogPodAutoscalerMaxChangeStrategySelect DatadogPodAutoscalerScalingStrategySelect = "Max"

	// DatadogPodAutoscalerMinChangeStrategySelect selects the policy with the lowest possible change.
	DatadogPodAutoscalerMinChangeStrategySelect DatadogPodAutoscalerScalingStrategySelect = "Min"

	// DatadogPodAutoscalerDisabledStrategySelect disables the scaling in this direction.
	DatadogPodAutoscalerDisabledStrategySelect DatadogPodAutoscalerScalingStrategySelect = "Disabled"
)

type DatadogPodAutoscalerStatus

type DatadogPodAutoscalerStatus struct {
	// Vertical is the status of the vertical scaling, if activated.
	// +optional
	Vertical *DatadogPodAutoscalerVerticalStatus `json:"vertical,omitempty"`

	// Horizontal is the status of the horizontal scaling, if activated.
	// +optional
	Horizontal *DatadogPodAutoscalerHorizontalStatus `json:"horizontal,omitempty"`

	// CurrentReplicas is the current number of pods for the targetRef observed by the controller.
	// +optional
	CurrentReplicas *int32 `json:"currentReplicas,omitempty"`

	// Options reflects the effective options applied by the autoscaler.
	// +optional
	Options *DatadogPodAutoscalerOptionsStatus `json:"options,omitempty"`

	// Conditions describe the current state of the DatadogPodAutoscaler operations.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []DatadogPodAutoscalerCondition `json:"conditions,omitempty"`
}

DatadogPodAutoscalerStatus defines the observed state of DatadogPodAutoscaler +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerStatus) DeepCopy

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

func (*DatadogPodAutoscalerStatus) DeepCopyInto

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

type DatadogPodAutoscalerTimeseriesFormulaRequest

type DatadogPodAutoscalerTimeseriesFormulaRequest struct {
	// Formula to compute (optional).
	// +optional
	Formula string `json:"formula,omitempty"`

	// Queries is a list of timeseries queries to use for the objective.
	// At least one query must be specified
	// +listType=atomic
	// +kubebuilder:validation:MinItems=1
	Queries []DatadogPodAutoscalerTimeseriesQuery `json:"queries"`
}

DatadogPodAutoscalerTimeseriesFormulaRequest is a subset of the v2 timeseries query API (metrics only). It mirrors the OpenAPI "DatadogPodAutoscalerTimeseriesFormulaRequestAttributes" fields relevant to autoscaling. Reference: https://github.com/DataDog/datadog-api-spec/blob/94d1542b31ad0df1da915bae84686b13ba1a65ae/spec/v2/query.yaml#L124 +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerTimeseriesFormulaRequest) DeepCopy

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

func (*DatadogPodAutoscalerTimeseriesFormulaRequest) DeepCopyInto

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

type DatadogPodAutoscalerTimeseriesQuery

type DatadogPodAutoscalerTimeseriesQuery struct {
	// Optional variable name ("a", "b", etc.) to reference in formulas.
	// +optional
	Name string `json:"name"`

	// Source defines the source of the timeseries query.
	Source DatadogPodAutoscalerMetricsDataSource `json:"source"`

	// Metrics is a standard Datadog metrics query.
	// +optional
	Metrics *DatadogPodAutoscalerMetricsTimeseriesQuery `json:"metrics,omitempty"`

	// ApmMetrics is allows to query APM metrics.
	// +optional
	ApmMetrics *DatadogPodAutoscalerApmMetricsTimeseriesQuery `json:"apmMetrics,omitempty"`
}

DatadogPodAutoscalerTimeseriesQuery is a discriminated union. Only Metrics and APMMetrics are supported for autoscaling. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerTimeseriesQuery) DeepCopy

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

func (*DatadogPodAutoscalerTimeseriesQuery) DeepCopyInto

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

type DatadogPodAutoscalerUpdatePolicy

type DatadogPodAutoscalerUpdatePolicy struct {
	// Strategy defines the mode of the update policy.
	Strategy DatadogPodAutoscalerUpdateStrategy `json:"strategy,omitempty"`

	// Controls how long we wait before forcing an eviction when the kubelet reports a resize as pending.
	// Must be greater than 0 and less than or equal to 3600 (1 hour).
	// +optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=3600
	ResizePendingPeriod int32 `json:"resizePendingPeriod,omitempty"`

	// Controls how long we wait before falling back to a full rollout when evictions are blocked.
	// Must be greater than 0 and less than or equal to 3600 (1 hour).
	// +optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=3600
	RolloutFallbackDelay int32 `json:"rolloutFallbackDelay,omitempty"`
}

DatadogPodAutoscalerUpdatePolicy defines the policy to update the target workload. +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerUpdatePolicy) DeepCopy

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

func (*DatadogPodAutoscalerUpdatePolicy) DeepCopyInto

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

type DatadogPodAutoscalerUpdateStrategy

type DatadogPodAutoscalerUpdateStrategy string

DatadogPodAutoscalerUpdateStrategy defines the mode of the update policy. +kubebuilder:validation:Enum:=Auto;Disabled;TriggerRollout

const (
	// DatadogPodAutoscalerAutoUpdateStrategy is the default mode.
	DatadogPodAutoscalerAutoUpdateStrategy DatadogPodAutoscalerUpdateStrategy = "Auto"

	// DatadogPodAutoscalerDisabledUpdateStrategy will disable the update of the target workload.
	DatadogPodAutoscalerDisabledUpdateStrategy DatadogPodAutoscalerUpdateStrategy = "Disabled"

	// DatadogPodAutoscalerTriggerRolloutUpdateStrategy triggers a full pod rollout to apply vertical recommendations.
	DatadogPodAutoscalerTriggerRolloutUpdateStrategy DatadogPodAutoscalerUpdateStrategy = "TriggerRollout"
)

type DatadogPodAutoscalerValueSource

type DatadogPodAutoscalerValueSource string

DatadogPodAutoscalerValueSource defines the source of the value used to scale the target workload.

const (
	// DatadogPodAutoscalerAutoscalingValueSource is a recommendation that comes from active autoscaling.
	DatadogPodAutoscalerAutoscalingValueSource DatadogPodAutoscalerValueSource = "Autoscaling"

	// DatadogPodAutoscalerManualValueSource is a recommendation that comes from manually applying a recommendation.
	DatadogPodAutoscalerManualValueSource DatadogPodAutoscalerValueSource = "Manual"

	// DatadogPodAutoscalerLocalValueSource is a recommendation that comes from the local fallback.
	DatadogPodAutoscalerLocalValueSource DatadogPodAutoscalerValueSource = "Local"

	// DatadogPodAutoscalerExternalValueSource is a recommendation that comes from an external source.
	DatadogPodAutoscalerExternalValueSource DatadogPodAutoscalerValueSource = "External"
)

type DatadogPodAutoscalerVerticalAction

type DatadogPodAutoscalerVerticalAction struct {
	// Time is the timestamp of the action
	Time metav1.Time `json:"time"`

	// Version is the version of the recommendation used for the action
	Version string `json:"version"`

	// Type is the type of action
	Type DatadogPodAutoscalerVerticalActionType `json:"type"`
}

DatadogPodAutoscalerVerticalAction represents a vertical action done by the controller +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerVerticalAction) DeepCopy

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

func (*DatadogPodAutoscalerVerticalAction) DeepCopyInto

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

type DatadogPodAutoscalerVerticalActionType

type DatadogPodAutoscalerVerticalActionType string

DatadogPodAutoscalerVerticalActionType represents the type of action done by the controller

const (
	// DatadogPodAutoscalerRolloutTriggeredVerticalActionType is the action when the controller triggers a rollout of the targetRef
	DatadogPodAutoscalerRolloutTriggeredVerticalActionType DatadogPodAutoscalerVerticalActionType = "RolloutTriggered"
	// DatadogPodAutoscalerResizeTriggeredVerticalActionType is the action when the controller triggers a resize of the pod resources of the targetRef
	DatadogPodAutoscalerResizeTriggeredVerticalActionType DatadogPodAutoscalerVerticalActionType = "ResizeTriggered"
	// DatadogPodAutoscalerResizeCompletedVerticalActionType is the action when all pods have completed an in-place resize cycle
	DatadogPodAutoscalerResizeCompletedVerticalActionType DatadogPodAutoscalerVerticalActionType = "ResizeCompleted"
)

type DatadogPodAutoscalerVerticalStatus

type DatadogPodAutoscalerVerticalStatus struct {
	// Target is the current target of the vertical scaling
	Target *DatadogPodAutoscalerVerticalTargetStatus `json:"target,omitempty"`

	// LastAction is the last successful action done by the controller
	LastAction *DatadogPodAutoscalerVerticalAction `json:"lastAction,omitempty"`
}

DatadogPodAutoscalerVerticalStatus defines the status of the vertical scaling +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerVerticalStatus) DeepCopy

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

func (*DatadogPodAutoscalerVerticalStatus) DeepCopyInto

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

type DatadogPodAutoscalerVerticalTargetStatus

type DatadogPodAutoscalerVerticalTargetStatus struct {
	// Source is the source of the value used to scale the target resource
	Source DatadogPodAutoscalerValueSource `json:"source"`

	// GeneratedAt is the timestamp at which the recommendation was generated
	GeneratedAt metav1.Time `json:"generatedAt,omitempty"`

	// Version is the current version of the received recommendation
	Version string `json:"version"`

	// Scaled is the current number of pods having desired resources
	Scaled *int32 `json:"scaled,omitempty"`

	// Evicted is the number of pods evicted as an in-place resize fallback during the
	// current recommendation cycle. Resets when the recommendation changes.
	Evicted *int32 `json:"evicted,omitempty"`

	// DesiredResources is the desired resources for containers
	DesiredResources []DatadogPodAutoscalerContainerResources `json:"desiredResources"`

	// PodCPURequest is the sum of CPU requests for all containers (used for display)
	PodCPURequest resource.Quantity `json:"podCPURequest"`

	// PodMemoryRequest is the sum of memory requests for all containers (used for display)
	PodMemoryRequest resource.Quantity `json:"podMemoryRequest"`
}

DatadogPodAutoscalerVerticalTargetStatus defines the current target of the vertical scaling +kubebuilder:object:generate=true

func (*DatadogPodAutoscalerVerticalTargetStatus) DeepCopy

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

func (*DatadogPodAutoscalerVerticalTargetStatus) DeepCopyInto

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

type RollingUpdate

type RollingUpdate struct {
	// The maximum number of pods that can be unavailable during the update.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Refer to the Kubernetes API documentation for additional details..
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

	// MaxSurge behaves differently based on the Kubernetes resource. Refer to the
	// Kubernetes API documentation for additional details.
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}

RollingUpdate describes how to replace existing pods with new ones. +k8s:openapi-gen=true +kubebuilder:object:generate=true

func (*RollingUpdate) DeepCopy

func (in *RollingUpdate) DeepCopy() *RollingUpdate

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

func (*RollingUpdate) DeepCopyInto

func (in *RollingUpdate) DeepCopyInto(out *RollingUpdate)

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

type UpdateStrategy

type UpdateStrategy struct {
	// Type can be "RollingUpdate" or "OnDelete" for DaemonSets and "RollingUpdate"
	// or "Recreate" for Deployments
	Type string `json:"type,omitempty"`
	// Configure the rolling update strategy of the Deployment or DaemonSet.
	RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"`
}

UpdateStrategy defines the deployment strategy used to replace existing pods with new ones. +k8s:openapi-gen=true +kubebuilder:object:generate=true

func (*UpdateStrategy) DeepCopy

func (in *UpdateStrategy) DeepCopy() *UpdateStrategy

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

func (*UpdateStrategy) DeepCopyInto

func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy)

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