v1alpha1

package
v1.9.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the datadoghq v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=datadoghq.com

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

Index

Constants

View Source
const (
	// NodeAgentComponentName is the name of the Datadog Node Agent
	NodeAgentComponentName ComponentName = "nodeAgent"

	CompletedStatus  CreateStrategyStatus = "Completed"
	WaitingStatus    CreateStrategyStatus = "Waiting"
	InProgressStatus CreateStrategyStatus = "In Progress"
)

Variables

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

	// 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 IsValidDatadogDashboard

func IsValidDatadogDashboard(spec *DatadogDashboardSpec) error

IsValidDatadogDashboard use to check if a DatadogDashboardSpec is valid by checking that the required fields are defined

func IsValidDatadogMonitor

func IsValidDatadogMonitor(spec *DatadogMonitorSpec) error

IsValidDatadogMonitor use to check if a DatadogMonitorSpec is valid by checking that the required fields are defined

func IsValidDatadogSLO

func IsValidDatadogSLO(spec *DatadogSLOSpec) error

IsValidDatadogSLO use to check if a DatadogSLOSpec is valid by checking that the required fields are defined

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateDatadogAgentProfileSpec

func ValidateDatadogAgentProfileSpec(spec *DatadogAgentProfileSpec) error

ValidateDatadogAgentProfileSpec is used to check if a DatadogAgentProfileSpec is valid

Types

type ComponentName

type ComponentName string

type Config

type Config struct {
	// Override the default configurations of the node agent.
	Override map[ComponentName]*Override `json:"override,omitempty"`
}

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

type Container

type Container struct {
	// Specify additional environment variables in the container.
	// See also: https://docs.datadoghq.com/agent/guide/environment-variables/
	//
	// +optional
	// +listType=map
	// +listMapKey=name
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Specify the Request and Limits of the pods.
	// To get guaranteed QoS class, specify requests and limits equal.
	// See also: http://kubernetes.io/docs/user-guide/compute-resources/
	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}

func (*Container) DeepCopy

func (in *Container) DeepCopy() *Container

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

func (*Container) DeepCopyInto

func (in *Container) DeepCopyInto(out *Container)

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

type CreateStrategy

type CreateStrategy struct {
	// Status shows the current state of the feature.
	// +optional
	Status CreateStrategyStatus `json:"status,omitempty"`

	// NodesLabeled shows the number of nodes currently labeled.
	// +optional
	NodesLabeled int32 `json:"nodesLabeled"`

	// PodsReady shows the number of pods in the ready state.
	// +optional
	PodsReady int32 `json:"podsReady"`

	// MaxUnavailable shows the number of pods that can be in an unready state.
	// +optional
	MaxUnavailable int32 `json:"maxUnavailable"`

	// LastTransition is the last time the status was updated.
	// +optional
	LastTransition *metav1.Time `json:"lastTransition,omitempty"`
}

CreateStrategy defines the observed state of the create strategy feature based on the agent deployment. +k8s:openapi-gen=true +kubebuilder:object:generate=true

func (*CreateStrategy) DeepCopy

func (in *CreateStrategy) DeepCopy() *CreateStrategy

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

func (*CreateStrategy) DeepCopyInto

func (in *CreateStrategy) DeepCopyInto(out *CreateStrategy)

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

type CreateStrategyStatus

type CreateStrategyStatus string

type DashboardTemplateVariable

type DashboardTemplateVariable struct {
	// The list of values that the template variable drop-down is limited to.
	AvailableValues *[]string `json:"availableValues,omitempty"`
	// One or many default values for template variables on load. If more than one default is specified, they will be unioned together with `OR`. Cannot be used in conjunction with `default`.
	// +listType=set
	Defaults []string `json:"defaults,omitempty"`
	// The name of the variable.
	Name string `json:"name"`
	// The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
	Prefix *string `json:"prefix,omitempty"`
}

DashboardTemplateVariable Template variable. +k8s:openapi-gen=true

func (*DashboardTemplateVariable) DeepCopy

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

func (*DashboardTemplateVariable) DeepCopyInto

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

type DashboardTemplateVariablePreset

type DashboardTemplateVariablePreset struct {
	// The name of the variable.
	Name *string `json:"name"`
	// List of variables.
	// +listType=map
	// +listMapKey=name
	TemplateVariables []DashboardTemplateVariablePresetValue `json:"templateVariables,omitempty"`
}

DashboardTemplateVariablePreset Template variables saved views. +k8s:openapi-gen=true

func (*DashboardTemplateVariablePreset) DeepCopy

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

func (*DashboardTemplateVariablePreset) DeepCopyInto

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

type DashboardTemplateVariablePresetValue

type DashboardTemplateVariablePresetValue struct {
	// The name of the variable.
	Name *string `json:"name"`
	// One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. Cannot be used in conjunction with `value`.
	// +listType=set
	Values []string `json:"values,omitempty"`
}

DashboardTemplateVariablePresetValue Template variables saved views. +k8s:openapi-gen=true

func (*DashboardTemplateVariablePresetValue) DeepCopy

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

func (*DashboardTemplateVariablePresetValue) DeepCopyInto

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

type DatadogAgentConditionType

type DatadogAgentConditionType string

DatadogAgentConditionType type use to represent a DatadogAgent condition.

const (
	// DatadogMetricsActive forwarding metrics and events to Datadog is active.
	DatadogMetricsActive DatadogAgentConditionType = "ActiveDatadogMetrics"
	// DatadogMetricsError cannot forward deployment metrics and events to Datadog.
	DatadogMetricsError DatadogAgentConditionType = "DatadogMetricsError"
)

type DatadogAgentProfile

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

	Spec   DatadogAgentProfileSpec   `json:"spec,omitempty"`
	Status DatadogAgentProfileStatus `json:"status,omitempty"`
}

DatadogAgentProfile is the Schema for the datadogagentprofiles API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=datadogagentprofiles,shortName=dap +kubebuilder:printcolumn:name="valid",type="string",JSONPath=".status.valid" +kubebuilder:printcolumn:name="applied",type="string",JSONPath=".status.applied" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true

func (*DatadogAgentProfile) DeepCopy

func (in *DatadogAgentProfile) DeepCopy() *DatadogAgentProfile

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

func (*DatadogAgentProfile) DeepCopyInto

func (in *DatadogAgentProfile) DeepCopyInto(out *DatadogAgentProfile)

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

func (*DatadogAgentProfile) DeepCopyObject

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

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

type DatadogAgentProfileList

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

DatadogAgentProfileList contains a list of DatadogAgentProfile

func (*DatadogAgentProfileList) DeepCopy

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

func (*DatadogAgentProfileList) DeepCopyInto

func (in *DatadogAgentProfileList) DeepCopyInto(out *DatadogAgentProfileList)

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

func (*DatadogAgentProfileList) DeepCopyObject

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

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

type DatadogAgentProfileSpec

type DatadogAgentProfileSpec struct {
	ProfileAffinity *ProfileAffinity `json:"profileAffinity,omitempty"`
	Config          *Config          `json:"config,omitempty"`
}

DatadogAgentProfileSpec defines the desired state of DatadogAgentProfile

func (*DatadogAgentProfileSpec) DeepCopy

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

func (*DatadogAgentProfileSpec) DeepCopyInto

func (in *DatadogAgentProfileSpec) DeepCopyInto(out *DatadogAgentProfileSpec)

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

type DatadogAgentProfileStatus

type DatadogAgentProfileStatus struct {
	// LastUpdate is the last time the status was updated.
	// +optional
	LastUpdate *metav1.Time `json:"lastUpdate,omitempty"`

	// CurrentHash is the stored hash of the DatadogAgentProfile.
	// +optional
	CurrentHash string `json:"currentHash,omitempty"`

	// Conditions represents the latest available observations of a DatadogAgentProfile's current state.
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions"`

	// Valid shows if the DatadogAgentProfile has a valid config spec.
	// +optional
	Valid metav1.ConditionStatus `json:"valid,omitempty"`

	// Applied shows whether the DatadogAgentProfile conflicts with an existing DatadogAgentProfile.
	// +optional
	Applied metav1.ConditionStatus `json:"applied,omitempty"`

	// CreateStrategy is the state of the create strategy feature.
	// +optional
	CreateStrategy *CreateStrategy `json:"CreateStrategy,omitempty"`
}

DatadogAgentProfileStatus defines the observed state of DatadogAgentProfile +k8s:openapi-gen=true

func (*DatadogAgentProfileStatus) DeepCopy

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

func (*DatadogAgentProfileStatus) DeepCopyInto

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

type DatadogDashboard

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

	Spec   DatadogDashboardSpec   `json:"spec,omitempty"`
	Status DatadogDashboardStatus `json:"status,omitempty"`
}

DatadogDashboard is the Schema for the datadogdashboards API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=datadogdashboards,scope=Namespaced,shortName=ddd +kubebuilder:printcolumn:name="id",type="string",JSONPath=".status.id" +kubebuilder:printcolumn:name="sync status",type="string",JSONPath=".status.syncStatus" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true +genclient

func (*DatadogDashboard) DeepCopy

func (in *DatadogDashboard) DeepCopy() *DatadogDashboard

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

func (*DatadogDashboard) DeepCopyInto

func (in *DatadogDashboard) DeepCopyInto(out *DatadogDashboard)

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

func (*DatadogDashboard) DeepCopyObject

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

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

type DatadogDashboardList

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

DatadogDashboardList contains a list of DatadogDashboard +kubebuilder:object:root=true

func (*DatadogDashboardList) DeepCopy

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

func (*DatadogDashboardList) DeepCopyInto

func (in *DatadogDashboardList) DeepCopyInto(out *DatadogDashboardList)

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

func (*DatadogDashboardList) DeepCopyObject

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

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

type DatadogDashboardSpec

type DatadogDashboardSpec struct {
	// Description is the description of the dashboard.
	// +optional
	Description string `json:"description,omitempty"`
	// LayoutType is the layout type of the dashboard.
	LayoutType datadogV1.DashboardLayoutType `json:"layoutType,omitempty"`
	// NotifyList is the list of handles of users to notify when changes are made to this dashboard.
	// +listType=set
	// +optional
	NotifyList []string `json:"notifyList,omitempty"`
	// Reflowtype is the reflow type for a 'new dashboard layout' dashboard. Set this only when layout type is 'ordered'.
	// If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto',
	// widgets should not have layouts.
	// +optional
	ReflowType *datadogV1.DashboardReflowType `json:"reflowType,omitempty"`
	// Tags is a list of team names representing ownership of a dashboard.
	// +listType=set
	// +optional
	Tags []string `json:"tags,omitempty"`
	// TemplateVariablePresets is an array of template variables saved views.
	// +listType=map
	// +listMapKey=name
	// +optional
	TemplateVariablePresets []DashboardTemplateVariablePreset `json:"templateVariablePresets,omitempty"`
	// TemplateVariables is a list of template variables for this dashboard.
	// +listType=map
	// +listMapKey=name
	// +optional
	TemplateVariables []DashboardTemplateVariable `json:"templateVariables,omitempty"`
	// Title is the title of the dashboard.
	Title string `json:"title,omitempty"`
	// Widgets is a JSON string representation of a list of Datadog API Widgets
	// +optional
	Widgets string `json:"widgets,omitempty"`
}

DatadogDashboardSpec defines the desired state of DatadogDashboard +k8s:openapi-gen=true

func (*DatadogDashboardSpec) DeepCopy

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

func (*DatadogDashboardSpec) DeepCopyInto

func (in *DatadogDashboardSpec) DeepCopyInto(out *DatadogDashboardSpec)

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

type DatadogDashboardStatus

type DatadogDashboardStatus struct {
	// Conditions represents the latest available observations of the state of a DatadogDashboard.
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ID is the dashboard ID generated in Datadog.
	ID string `json:"id,omitempty"`
	// Creator is the identity of the dashboard creator.
	Creator string `json:"creator,omitempty"`
	// Created is the time the dashboard was created.
	Created *metav1.Time `json:"created,omitempty"`
	// SyncStatus shows the health of syncing the dashboard state to Datadog.
	SyncStatus DatadogDashboardSyncStatus `json:"syncStatus,omitempty"`
	// CurrentHash tracks the hash of the current DatadogDashboardSpec to know
	// if the Spec has changed and needs an update.
	CurrentHash string `json:"currentHash,omitempty"`
	// LastForceSyncTime is the last time the API dashboard was last force synced with the DatadogDashboard resource
	LastForceSyncTime *metav1.Time `json:"lastForceSyncTime,omitempty"`
}

DatadogDashboardStatus defines the observed state of DatadogDashboard +k8s:openapi-gen=true

func (*DatadogDashboardStatus) DeepCopy

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

func (*DatadogDashboardStatus) DeepCopyInto

func (in *DatadogDashboardStatus) DeepCopyInto(out *DatadogDashboardStatus)

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

type DatadogDashboardSyncStatus

type DatadogDashboardSyncStatus string
const (
	// DatadogDashboardSyncStatusOK means syncing is OK.
	DatadogDashboardSyncStatusOK DatadogDashboardSyncStatus = "OK"
	// DatadogDashboardSyncStatusValidateError means there is a dashboard validation error.
	DatadogDashboardSyncStatusValidateError DatadogDashboardSyncStatus = "error validating dashboard"
	// DatadogDashboardSyncStatusUpdateError means there is a dashboard update error.
	DatadogDashboardSyncStatusUpdateError DatadogDashboardSyncStatus = "error updating dashboard"
	// DatadogDashboardSyncStatusCreateError means there is an error getting the dashboard.
	DatadogDashboardSyncStatusCreateError DatadogDashboardSyncStatus = "error creating dashboard"
	// SyncStatusGetError means there is an error getting the monitor
	DatadoggDashboardSyncStatusGetError DatadogDashboardSyncStatus = "error getting dashboard"
)

type DatadogMetric

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

	Spec   DatadogMetricSpec   `json:"spec,omitempty"`
	Status DatadogMetricStatus `json:"status,omitempty"`
}

DatadogMetric allows autoscaling on arbitrary Datadog query +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=datadogmetrics,scope=Namespaced +kubebuilder:printcolumn:name="active",type="string",JSONPath=".status.conditions[?(@.type=='Active')].status" +kubebuilder:printcolumn:name="valid",type="string",JSONPath=".status.conditions[?(@.type=='Valid')].status" +kubebuilder:printcolumn:name="value",type="string",JSONPath=".status.currentValue" +kubebuilder:printcolumn:name="references",type="string",JSONPath=".status.autoscalerReferences" +kubebuilder:printcolumn:name="update time",type="date",JSONPath=".status.conditions[?(@.type=='Updated')].lastUpdateTime" +k8s:openapi-gen=true +genclient

func (*DatadogMetric) DeepCopy

func (in *DatadogMetric) DeepCopy() *DatadogMetric

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

func (*DatadogMetric) DeepCopyInto

func (in *DatadogMetric) DeepCopyInto(out *DatadogMetric)

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

func (*DatadogMetric) DeepCopyObject

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

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

type DatadogMetricCondition

type DatadogMetricCondition struct {
	// Type of DatadogMetric condition.
	Type DatadogMetricConditionType `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"`
	// Last time the condition was updated.
	// +optional
	LastUpdateTime metav1.Time `json:"lastUpdateTime,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"`
}

DatadogMetricCondition describes the state of a DatadogMetric at a certain point. +k8s:openapi-gen=true

func (*DatadogMetricCondition) DeepCopy

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

func (*DatadogMetricCondition) DeepCopyInto

func (in *DatadogMetricCondition) DeepCopyInto(out *DatadogMetricCondition)

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

type DatadogMetricConditionType

type DatadogMetricConditionType string

DatadogMetricConditionType type use to represent a DatadogMetric condition

const (
	// DatadogMetricConditionTypeActive DatadogMetric is active (referenced by an HPA), Datadog will only be queried for active metrics
	DatadogMetricConditionTypeActive DatadogMetricConditionType = "Active"
	// DatadogMetricConditionTypeUpdated DatadogMetric is updated
	DatadogMetricConditionTypeUpdated DatadogMetricConditionType = "Updated"
	// DatadogMetricConditionTypeValid DatadogMetric.spec.query is invalid
	DatadogMetricConditionTypeValid DatadogMetricConditionType = "Valid"
	// DatadogMetricConditionTypeError the controller wasn't able to handle this DatadogMetric
	DatadogMetricConditionTypeError DatadogMetricConditionType = "Error"
)

type DatadogMetricList

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

DatadogMetricList contains a list of DatadogMetric +kubebuilder:object:root=true

func (*DatadogMetricList) DeepCopy

func (in *DatadogMetricList) DeepCopy() *DatadogMetricList

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

func (*DatadogMetricList) DeepCopyInto

func (in *DatadogMetricList) DeepCopyInto(out *DatadogMetricList)

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

func (*DatadogMetricList) DeepCopyObject

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

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

type DatadogMetricSpec

type DatadogMetricSpec struct {
	// Query is the raw datadog query
	Query string `json:"query,omitempty"`
	// ExternalMetricName is reserved for internal use
	ExternalMetricName string `json:"externalMetricName,omitempty"`
	// MaxAge provides the max age for the metric query (overrides the default setting
	// `external_metrics_provider.max_age`)
	// +optional
	MaxAge metav1.Duration `json:"maxAge,omitempty"`
	// TimeWindow provides the time window for the metric query, defaults to MaxAge.
	// +optional
	TimeWindow metav1.Duration `json:"timeWindow,omitempty"`
}

DatadogMetricSpec defines the desired state of DatadogMetric

func (*DatadogMetricSpec) DeepCopy

func (in *DatadogMetricSpec) DeepCopy() *DatadogMetricSpec

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

func (*DatadogMetricSpec) DeepCopyInto

func (in *DatadogMetricSpec) DeepCopyInto(out *DatadogMetricSpec)

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

type DatadogMetricStatus

type DatadogMetricStatus struct {
	// Conditions Represents the latest available observations of a DatadogMetric's current state.
	// +listType=map
	// +listMapKey=type
	Conditions []DatadogMetricCondition `json:"conditions,omitempty"`
	// Value is the latest value of the metric
	Value string `json:"currentValue"`
	// List of autoscalers currently using this DatadogMetric
	AutoscalerReferences string `json:"autoscalerReferences,omitempty"`
}

DatadogMetricStatus defines the observed state of DatadogMetric

func (*DatadogMetricStatus) DeepCopy

func (in *DatadogMetricStatus) DeepCopy() *DatadogMetricStatus

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

func (*DatadogMetricStatus) DeepCopyInto

func (in *DatadogMetricStatus) DeepCopyInto(out *DatadogMetricStatus)

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

type DatadogMonitor

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

	Spec   DatadogMonitorSpec   `json:"spec,omitempty"`
	Status DatadogMonitorStatus `json:"status,omitempty"`
}

DatadogMonitor allows to define and manage Monitors from your Kubernetes Cluster +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=datadogmonitors,scope=Namespaced +kubebuilder:printcolumn:name="id",type="string",JSONPath=".status.id" +kubebuilder:printcolumn:name="monitor state",type="string",JSONPath=".status.monitorState" +kubebuilder:printcolumn:name="last state transition",type="string",JSONPath=".status.monitorStateLastTransitionTime" +kubebuilder:printcolumn:name="last state sync",type="string",format="date",JSONPath=".status.monitorStateLastUpdateTime" +kubebuilder:printcolumn:name="sync status",type="string",JSONPath=".status.syncStatus" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true +genclient

func (*DatadogMonitor) DeepCopy

func (in *DatadogMonitor) DeepCopy() *DatadogMonitor

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

func (*DatadogMonitor) DeepCopyInto

func (in *DatadogMonitor) DeepCopyInto(out *DatadogMonitor)

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

func (*DatadogMonitor) DeepCopyObject

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

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

type DatadogMonitorCondition

type DatadogMonitorCondition struct {
	// Type of DatadogMonitor condition
	Type DatadogMonitorConditionType `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"`
	// Last time the condition was updated.
	// +optional
	LastUpdateTime metav1.Time `json:"lastUpdateTime,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"`
}

DatadogMonitorCondition describes the current state of a DatadogMonitor +k8s:openapi-gen=true

func (*DatadogMonitorCondition) DeepCopy

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

func (*DatadogMonitorCondition) DeepCopyInto

func (in *DatadogMonitorCondition) DeepCopyInto(out *DatadogMonitorCondition)

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

type DatadogMonitorConditionType

type DatadogMonitorConditionType string

DatadogMonitorConditionType represents a DatadogMonitor condition

const (
	// DatadogMonitorConditionTypeCreated means the DatadogMonitor is created successfully
	DatadogMonitorConditionTypeCreated DatadogMonitorConditionType = "Created"
	// DatadogMonitorConditionTypeActive means the DatadogMonitor is active
	DatadogMonitorConditionTypeActive DatadogMonitorConditionType = "Active"
	// DatadogMonitorConditionTypeUpdated means the DatadogMonitor is updated
	DatadogMonitorConditionTypeUpdated DatadogMonitorConditionType = "Updated"
	// DatadogMonitorConditionTypeError means the DatadogMonitor has an error
	DatadogMonitorConditionTypeError DatadogMonitorConditionType = "Error"
)

type DatadogMonitorControllerOptions

type DatadogMonitorControllerOptions struct {
	// DisableRequiredTags disables the automatic addition of required tags to monitors.
	DisableRequiredTags *bool `json:"disableRequiredTags,omitempty"`
}

DatadogMonitorControllerOptions defines options in the DatadogMonitor controller +k8s:openapi-gen=true

func (*DatadogMonitorControllerOptions) DeepCopy

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

func (*DatadogMonitorControllerOptions) DeepCopyInto

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

type DatadogMonitorDowntimeStatus

type DatadogMonitorDowntimeStatus struct {
	// IsDowntimed shows the downtime status of the monitor.
	IsDowntimed bool `json:"isDowntimed,omitempty"`
	// DowntimeID is the downtime ID.
	DowntimeID int `json:"downtimeID,omitempty"`
}

DatadogMonitorDowntimeStatus represents the downtime status of a DatadogMonitor +k8s:openapi-gen=true

func (*DatadogMonitorDowntimeStatus) DeepCopy

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

func (*DatadogMonitorDowntimeStatus) DeepCopyInto

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

type DatadogMonitorList

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

DatadogMonitorList contains a list of DatadogMonitors +kubebuilder:object:root=true

func (*DatadogMonitorList) DeepCopy

func (in *DatadogMonitorList) DeepCopy() *DatadogMonitorList

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

func (*DatadogMonitorList) DeepCopyInto

func (in *DatadogMonitorList) DeepCopyInto(out *DatadogMonitorList)

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

func (*DatadogMonitorList) DeepCopyObject

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

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

type DatadogMonitorOptions

type DatadogMonitorOptions struct {
	// A Boolean indicating whether to send a log sample when the log monitor triggers.
	EnableLogsSample *bool `json:"enableLogsSample,omitempty"`
	// A message to include with a re-notification.
	EscalationMessage *string `json:"escalationMessage,omitempty"`
	// Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min),
	// the timeframe is set to last_5m and the time is 7:00, the monitor evaluates data from 6:50 to 6:55.
	// This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.
	EvaluationDelay *int64 `json:"evaluationDelay,omitempty"`
	// A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.
	IncludeTags *bool `json:"includeTags,omitempty"`
	// A Boolean indicating whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold.
	GroupbySimpleMonitor *bool `json:"groupbySimpleMonitor,omitempty"`
	// DEPRECATED: Whether or not the monitor is locked (only editable by creator and admins). Use `restricted_roles` instead.
	// +deprecated
	Locked *bool `json:"locked,omitempty"`
	// Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of
	// monitor results. Should be a non negative integer.
	NewGroupDelay *int64 `json:"newGroupDelay,omitempty"`
	// The number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the
	// monitor timeframe for metric alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe
	// is used for metric alerts, and 24 hours is used for service checks.
	NoDataTimeframe *int64 `json:"noDataTimeframe,omitempty"`
	// An enum that toggles the display of additional content sent in the monitor notification.
	NotificationPresetName DatadogMonitorOptionsNotificationPreset `json:"notificationPresetName,omitempty"`
	// A Boolean indicating whether tagged users are notified on changes to this monitor.
	NotifyAudit *bool `json:"notifyAudit,omitempty"`
	// A string indicating the granularity a monitor alerts on. Only available for monitors with groupings.
	// For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new
	// cluster violating the alert conditions by setting notify_by to ["cluster"]. Tags mentioned in notify_by must
	// be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot
	// notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.
	// +listType=set
	NotifyBy []string `json:"notifyBy,omitempty"`
	// A Boolean indicating whether this monitor notifies when data stops reporting.
	NotifyNoData *bool `json:"notifyNoData,omitempty"`
	// An enum that controls how groups or monitors are treated if an evaluation does not return data points.
	// The default option results in different behavior depending on the monitor query type.
	// For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions.
	// For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status.
	// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors
	OnMissingData DatadogMonitorOptionsOnMissingData `json:"onMissingData,omitempty"`
	// The number of minutes after the last notification before a monitor re-notifies on the current status.
	// It only re-notifies if it’s not resolved.
	RenotifyInterval *int64 `json:"renotifyInterval,omitempty"`
	// The number of times re-notification messages should be sent on the current status at the provided re-notification interval.
	RenotifyOccurrences *int64 `json:"renotifyOccurrences,omitempty"`
	// The types of statuses for which re-notification messages should be sent. Valid values are alert, warn, no data.
	// +listType=set
	RenotifyStatuses []datadogV1.MonitorRenotifyStatusType `json:"renotifyStatuses,omitempty"`
	// A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly
	// recommend you set this to false for sparse metrics, otherwise some evaluations are skipped. Default is false.
	RequireFullWindow *bool `json:"requireFullWindow,omitempty"`
	// The number of hours of the monitor not reporting data before it automatically resolves from a triggered state.
	TimeoutH *int64 `json:"timeoutH,omitempty"`
	// A struct of the different monitor threshold values.
	Thresholds *DatadogMonitorOptionsThresholds `json:"thresholds,omitempty"`
	// A struct of the alerting time window options.
	ThresholdWindows *DatadogMonitorOptionsThresholdWindows `json:"thresholdWindows,omitempty"`
}

DatadogMonitorOptions define the optional parameters of a monitor +k8s:openapi-gen=true

func (*DatadogMonitorOptions) DeepCopy

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

func (*DatadogMonitorOptions) DeepCopyInto

func (in *DatadogMonitorOptions) DeepCopyInto(out *DatadogMonitorOptions)

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

type DatadogMonitorOptionsNotificationPreset

type DatadogMonitorOptionsNotificationPreset string

DatadogMonitorOptionsNotificationPreset toggles the display of additional content sent in the monitor notification.

const (
	DatadogMonitorOptionsNotificationPresetShowAll     DatadogMonitorOptionsNotificationPreset = "show_all"
	DatadogMonitorOptionsNotificationPresetHideQuery   DatadogMonitorOptionsNotificationPreset = "hide_query"
	DatadogMonitorOptionsNotificationPresetHideHandles DatadogMonitorOptionsNotificationPreset = "hide_handles"
	DatadogMonitorOptionsNotificationPresetHideAll     DatadogMonitorOptionsNotificationPreset = "hide_all"
)

type DatadogMonitorOptionsOnMissingData

type DatadogMonitorOptionsOnMissingData string

DatadogMonitorOptionsOnMissingData controls how groups or monitors are treated if an evaluation does not return any data points

const (
	DatadogMonitorOptionsOnMissingDataShowNoData          DatadogMonitorOptionsOnMissingData = "show_no_data"
	DatadogMonitorOptionsOnMissingDataShowAndNotifyNoData DatadogMonitorOptionsOnMissingData = "show_and_notify_no_data"
	DatadogMonitorOptionsOnMissingDataResolve             DatadogMonitorOptionsOnMissingData = "resolve"
	DatadogMonitorOptionsOnMissingDataDefault             DatadogMonitorOptionsOnMissingData = "default"
)

type DatadogMonitorOptionsThresholdWindows

type DatadogMonitorOptionsThresholdWindows struct {
	// Describes how long an anomalous metric must be normal before the alert recovers.
	RecoveryWindow *string `json:"recoveryWindow,omitempty"`
	// Describes how long a metric must be anomalous before an alert triggers.
	TriggerWindow *string `json:"triggerWindow,omitempty"`
}

DatadogMonitorOptionsThresholdWindows is a struct of the alerting time window options +k8s:openapi-gen=true

func (*DatadogMonitorOptionsThresholdWindows) DeepCopy

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

func (*DatadogMonitorOptionsThresholdWindows) DeepCopyInto

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

type DatadogMonitorOptionsThresholds

type DatadogMonitorOptionsThresholds struct {
	// The monitor CRITICAL threshold.
	Critical *string `json:"critical,omitempty"`
	// The monitor CRITICAL recovery threshold.
	CriticalRecovery *string `json:"criticalRecovery,omitempty"`
	// The monitor OK threshold.
	OK *string `json:"ok,omitempty"`
	// The monitor UNKNOWN threshold.
	Unknown *string `json:"unknown,omitempty"`
	// The monitor WARNING threshold.
	Warning *string `json:"warning,omitempty"`
	// The monitor WARNING recovery threshold.
	WarningRecovery *string `json:"warningRecovery,omitempty"`
}

DatadogMonitorOptionsThresholds is a struct of the different monitor threshold values +k8s:openapi-gen=true

func (*DatadogMonitorOptionsThresholds) DeepCopy

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

func (*DatadogMonitorOptionsThresholds) DeepCopyInto

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

type DatadogMonitorSpec

type DatadogMonitorSpec struct {
	// Name is the monitor name
	Name string `json:"name,omitempty"`
	// Message is a message to include with notifications for this monitor
	Message string `json:"message,omitempty"`
	// Priority is an integer from 1 (high) to 5 (low) indicating alert severity
	Priority int64 `json:"priority,omitempty"`
	// Query is the Datadog monitor query
	Query string `json:"query,omitempty"`
	// RestrictedRoles is a list of unique role identifiers to define which roles are allowed to edit the monitor.
	// `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`,
	// see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options).
	// +listType=set
	RestrictedRoles []string `json:"restrictedRoles,omitempty"`
	// Tags is the monitor tags associated with your monitor
	// +listType=set
	Tags []string `json:"tags,omitempty"`
	// Type is the monitor type
	Type DatadogMonitorType `json:"type,omitempty"`
	// Options are the optional parameters associated with your monitor
	Options DatadogMonitorOptions `json:"options,omitempty"`

	// ControllerOptions are the optional parameters in the DatadogMonitor controller
	ControllerOptions DatadogMonitorControllerOptions `json:"controllerOptions,omitempty"`
}

DatadogMonitorSpec defines the desired state of DatadogMonitor +k8s:openapi-gen=true

func (*DatadogMonitorSpec) DeepCopy

func (in *DatadogMonitorSpec) DeepCopy() *DatadogMonitorSpec

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

func (*DatadogMonitorSpec) DeepCopyInto

func (in *DatadogMonitorSpec) DeepCopyInto(out *DatadogMonitorSpec)

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

type DatadogMonitorState

type DatadogMonitorState string

DatadogMonitorState represents the overall DatadogMonitor state

const (
	// DatadogMonitorStateOK means the DatadogMonitor is OK
	DatadogMonitorStateOK DatadogMonitorState = "OK"
	// DatadogMonitorStateAlert means the DatadogMonitor triggered an alert
	DatadogMonitorStateAlert DatadogMonitorState = "Alert"
	// DatadogMonitorStateWarn means the DatadogMonitor triggered a warning
	DatadogMonitorStateWarn DatadogMonitorState = "Warn"
	// DatadogMonitorStateNoData means the DatadogMonitor triggered a no data alert
	DatadogMonitorStateNoData DatadogMonitorState = "No Data"
	// DatadogMonitorStateSkipped means the DatadogMonitor is skipped
	DatadogMonitorStateSkipped DatadogMonitorState = "Skipped"
	// DatadogMonitorStateIgnored means the DatadogMonitor is ignored
	DatadogMonitorStateIgnored DatadogMonitorState = "Ignored"
	// DatadogMonitorStateUnknown means the DatadogMonitor is in an unknown state
	DatadogMonitorStateUnknown DatadogMonitorState = "Unknown"
)

type DatadogMonitorStatus

type DatadogMonitorStatus struct {
	// Conditions Represents the latest available observations of a DatadogMonitor's current state.
	// +listType=map
	// +listMapKey=type
	Conditions []DatadogMonitorCondition `json:"conditions,omitempty"`

	// ID is the monitor ID generated in Datadog
	ID int `json:"id,omitempty"`
	// Creator is the identify of the monitor creator
	Creator string `json:"creator,omitempty"`
	// Created is the time the monitor was created
	Created *metav1.Time `json:"created,omitempty"`
	// MonitorState is the overall state of monitor
	MonitorState DatadogMonitorState `json:"monitorState,omitempty"`
	// MonitorLastForceSyncTime is the last time the API monitor was last force synced with the DatadogMonitor resource
	MonitorLastForceSyncTime *metav1.Time `json:"monitorLastForceSyncTime,omitempty"`
	// MonitorStateLastUpdateTime is the last time the monitor state updated
	MonitorStateLastUpdateTime *metav1.Time `json:"monitorStateLastUpdateTime,omitempty"`
	// MonitorStateLastTransitionTime is the last time the monitor state changed
	MonitorStateLastTransitionTime *metav1.Time `json:"monitorStateLastTransitionTime,omitempty"`
	// MonitorStateSyncStatus shows the health of syncing the monitor state to Datadog
	MonitorStateSyncStatus MonitorStateSyncStatusMessage `json:"monitorStateSyncStatus,omitempty"`
	// TriggeredState only includes details for monitor groups that are triggering
	// +listType=map
	// +listMapKey=monitorGroup
	TriggeredState []DatadogMonitorTriggeredState `json:"triggeredState,omitempty"`
	// DowntimeStatus defines whether the monitor is downtimed
	DowntimeStatus DatadogMonitorDowntimeStatus `json:"downtimeStatus,omitempty"`

	// Primary defines whether the monitor is managed by the Kubernetes custom
	// resource (true) or outside Kubernetes (false)
	Primary bool `json:"primary,omitempty"`

	// CurrentHash tracks the hash of the current DatadogMonitorSpec to know
	// if the Spec has changed and needs an update
	CurrentHash string `json:"currentHash,omitempty"`
}

DatadogMonitorStatus defines the observed state of DatadogMonitor +k8s:openapi-gen=true

func (*DatadogMonitorStatus) DeepCopy

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

func (*DatadogMonitorStatus) DeepCopyInto

func (in *DatadogMonitorStatus) DeepCopyInto(out *DatadogMonitorStatus)

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

type DatadogMonitorTriggeredState

type DatadogMonitorTriggeredState struct {
	// MonitorGroup is the name of the triggering group
	MonitorGroup       string              `json:"monitorGroup"`
	State              DatadogMonitorState `json:"state,omitempty"`
	LastTransitionTime metav1.Time         `json:"lastTransitionTime,omitempty"`
}

DatadogMonitorTriggeredState represents the details of a triggering DatadogMonitor The DatadogMonitor is triggering if one of its groups is in Alert, Warn, or No Data +k8s:openapi-gen=true

func (*DatadogMonitorTriggeredState) DeepCopy

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

func (*DatadogMonitorTriggeredState) DeepCopyInto

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

type DatadogMonitorType

type DatadogMonitorType string

DatadogMonitorType defines the type of monitor

const (
	// DatadogMonitorTypeMetric is the metric alert monitor type
	DatadogMonitorTypeMetric DatadogMonitorType = "metric alert"
	// DatadogMonitorTypeQuery is the query alert monitor type
	DatadogMonitorTypeQuery DatadogMonitorType = "query alert"
	// DatadogMonitorTypeService is the service check monitor type
	DatadogMonitorTypeService DatadogMonitorType = "service check"
	// DatadogMonitorTypeEvent is the event alert monitor type
	DatadogMonitorTypeEvent DatadogMonitorType = "event alert"
	// DatadogMonitorTypeLog is the log alert monitor type
	DatadogMonitorTypeLog DatadogMonitorType = "log alert"
	// DatadogMonitorTypeProcess is the process alert monitor type
	DatadogMonitorTypeProcess DatadogMonitorType = "process alert"
	// DatadogMonitorTypeRUM is the rum alert monitor type
	DatadogMonitorTypeRUM DatadogMonitorType = "rum alert"
	// DatadogMonitorTypeTraceAnalytics is the trace-analytics alert monitor type
	DatadogMonitorTypeTraceAnalytics DatadogMonitorType = "trace-analytics alert"
	// DatadogMonitorTypeSLO is the slo alert monitor type
	DatadogMonitorTypeSLO DatadogMonitorType = "slo alert"
	// DatadogMonitorTypeEventV2 is the event-v2 alert monitor type
	DatadogMonitorTypeEventV2 DatadogMonitorType = "event-v2 alert"
	// DatadogMonitorTypeAudit is the audit alert monitor type
	DatadogMonitorTypeAudit DatadogMonitorType = "audit alert"
	// DatadogMonitorTypeComposite is the composite alert monitor type
	DatadogMonitorTypeComposite DatadogMonitorType = "composite"
)

type DatadogPodAutoscaler

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

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

DatadogPodAutoscaler is the Schema for the datadogpodautoscalers API

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

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

const (
	// DatadogPodAutoscalerAllApplyMode allows the controller to apply all recommendations (regular and manual)
	DatadogPodAutoscalerAllApplyMode DatadogPodAutoscalerApplyMode = "All"

	// DatadogPodAutoscalerManualApplyMode allows the controller to only apply manual recommendations (recommendations manually validated by user in the Datadog app)
	DatadogPodAutoscalerManualApplyMode DatadogPodAutoscalerApplyMode = "Manual"

	// DatadogPodAutoscalerNoneApplyMode prevent the controller to apply any recommendations. Datadog will still produce and display recommendations
	// but the controller will not apply them, even when they are manually validated. Similar to "DryRun" mode.
	DatadogPodAutoscalerNoneApplyMode DatadogPodAutoscalerApplyMode = "None"
)

type DatadogPodAutoscalerCondition

type DatadogPodAutoscalerCondition struct {
	// Type of DatadogMetric 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.

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 type use to represent a DatadogMetric 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 we can get horizontal recommendation 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 we can ge vertical recommendation from Datadog.
	DatadogPodAutoscalerVerticalAbleToRecommendCondition DatadogPodAutoscalerConditionType = "VerticalAbleToRecommend"

	// DatadogPodAutoscalerVerticalAbleToApply is true when we can rollout the targetRef to pick up new resources.
	DatadogPodAutoscalerVerticalAbleToApply DatadogPodAutoscalerConditionType = "VerticalAbleToApply"
)

type DatadogPodAutoscalerConstraints

type DatadogPodAutoscalerConstraints struct {
	// MinReplicas is the lower limit for the number of POD replicas. Needs to be >= 1. Default 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.
	MaxReplicas int32 `json:"maxReplicas"`

	// Containers defines constraints for the containers.
	Containers []DatadogPodAutoscalerContainerConstraints `json:"containers,omitempty"`
}

DatadogPodAutoscalerConstraints defines constraints that should always be respected.

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 false allows to disable resources autoscaling for the container. Default to true.
	Enabled *bool `json:"enabled,omitempty"`

	// Requests defines the constraints for the requests of the container.
	Requests *DatadogPodAutoscalerContainerResourceConstraints `json:"requests,omitempty"`

	// Limits defines the constraints for the limits of the container.
	Limits *DatadogPodAutoscalerContainerResourceConstraints `json:"limits,omitempty"`
}

DatadogPodAutoscalerContainerConstraints defines constraints that should always be respected for a container. If no constraints are set, it enables resources scaling for all containers without any constraints.

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 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"`
}

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 DatadogPodAutoscalerContainerResourceTarget

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

	// Value is the value of the target.
	Value DatadogPodAutoscalerTargetValue `json:"value"`

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

DatadogPodAutoscalerContainerResourceTarget defines a Container level resource target (for instance, CPU Utilization for container named "foo" at 80%)

func (*DatadogPodAutoscalerContainerResourceTarget) DeepCopy

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

func (*DatadogPodAutoscalerContainerResourceTarget) 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 target resources of compute resources allowed.
	// +optional
	Requests corev1.ResourceList `json:"requests,omitempty"`
}

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 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 (ToReplicas != RecommendedReplicas)
	LimitedReason *string `json:"limitedReason,omitempty"`
}

DatadogPodAutoscalerHorizontalAction represents an horizontal action done by the controller

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 DatadogPodAutoscalerHorizontalStatus

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

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

DatadogPodAutoscalerHorizontalStatus defines the status of the horizontal scaling

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 DatadogPodAutoscalerHorizontalTargetStatus

type DatadogPodAutoscalerHorizontalTargetStatus 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"`

	// Replicas is the desired number of replicas for the resource
	Replicas int32 `json:"desiredReplicas"`
}

DatadogPodAutoscalerHorizontalTargetStatus defines the current target of the horizontal scaling

func (*DatadogPodAutoscalerHorizontalTargetStatus) DeepCopy

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

func (*DatadogPodAutoscalerHorizontalTargetStatus) 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 DatadogPodAutoscaler

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 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 Datadog app.
	DatadogPodAutoscalerLocalOwner DatadogPodAutoscalerOwner = "Local"

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

type DatadogPodAutoscalerPolicy

type DatadogPodAutoscalerPolicy struct {
	// ApplyMode determines recommendations that should be applied by the controller:
	// - All: Apply all recommendations (regular and manual).
	// - Manual: Apply only manual recommendations (recommendations manually validated by user in the Datadog app).
	// - None: Prevent the controller to apply any recommendations.
	// It's also possible to selectively deactivate upscale, downscale or update actions thanks to the `Upscale`, `Downscale` and `Update` fields.
	// +optional
	// +kubebuilder:default=All
	ApplyMode DatadogPodAutoscalerApplyMode `json:"applyMode"`

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

	// Upscale defines the policy to scale up the target resource.
	Upscale *DatadogPodAutoscalerScalingPolicy `json:"upscale,omitempty"`

	// Downscale defines the policy to scale down the target resource.
	Downscale *DatadogPodAutoscalerScalingPolicy `json:"downscale,omitempty"`
}

DatadogPodAutoscalerPolicy defines how recommendations should be applied.

func (*DatadogPodAutoscalerPolicy) DeepCopy

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

func (*DatadogPodAutoscalerPolicy) DeepCopyInto

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

type DatadogPodAutoscalerResourceTarget

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

	// Value is the value of the target.
	Value DatadogPodAutoscalerTargetValue `json:"value"`
}

DatadogPodAutoscalerResourceTarget defines a POD-level resource target (for instance, CPU Utilization at 80%) For POD-level targets, resources are the sum of all containers resources. Utilization is computed from sum(usage) / sum(requests).

func (*DatadogPodAutoscalerResourceTarget) DeepCopy

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

func (*DatadogPodAutoscalerResourceTarget) 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"`
}

DatadogPodAutoscalerScalingPolicy defines the policy to scale the target resource.

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 and should not be used unless Match is set to IfScalingEvent.
	// +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 1800 (30 min).
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=1800
	PeriodSeconds int32 `json:"periodSeconds"`

	// Match defines if the rule should be considered or not in the calculation.
	// Default to Always if not set.
	Match *DatadogPodAutoscalerScalingRuleMatch `json:"match,omitempty"`
}

DatadogPodAutoscalerScalingRule define rules for horizontal that should be true for a certain amount of time.

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 DatadogPodAutoscalerScalingRuleMatch

type DatadogPodAutoscalerScalingRuleMatch string

DatadogPodAutoscalerScalingRuleMatch +kubebuilder:validation:Enum:=Always;IfScalingEvent

const (
	// DatadogPodAutoscalerAlwaysScalingRuleMatch defines that the rule should always be considered in the calculation.
	DatadogPodAutoscalerAlwaysScalingRuleMatch DatadogPodAutoscalerScalingRuleMatch = "Always"

	// DatadogPodAutoscalerIfScalingEventRuleMatch defines that rule should only be considered if at least one scaling event occurred.
	// It allows to define behaviors such as forbidden windows (e.g. allow 0 PODs (Value) to be created in the next 5m (PeriodSeconds) after a scaling events).
	DatadogPodAutoscalerIfScalingEventRuleMatch DatadogPodAutoscalerScalingRuleMatch = "IfScalingEvent"
)

type DatadogPodAutoscalerScalingRuleType

type DatadogPodAutoscalerScalingRuleType string

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

const (
	// DatadogPodAutoscalerPodsScalingRuleType specifies a change in 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 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 needs to be set when a DatadogPodAutoscaler object is created.
	Owner DatadogPodAutoscalerOwner `json:"owner"`

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

	// Policy defines how recommendations should be applied.
	// +optional
	// +kubebuilder:default={}
	Policy *DatadogPodAutoscalerPolicy `json:"policy,omitempty"`

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

	// Constraints defines constraints that should always be respected.
	Constraints *DatadogPodAutoscalerConstraints `json:"constraints,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 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"`

	// 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

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 DatadogPodAutoscalerTarget

type DatadogPodAutoscalerTarget struct {
	// Type sets the type of the target.
	Type DatadogPodAutoscalerTargetType `json:"type"`

	// PodResource allows to set a POD-level resource target.
	PodResource *DatadogPodAutoscalerResourceTarget `json:"podResource,omitempty"`

	// ContainerResource allows to set a container-level resource target.
	ContainerResource *DatadogPodAutoscalerContainerResourceTarget `json:"containerResource,omitempty"`
}

DatadogPodAutoscalerTarget defines the objectives to reach and maintain for the target resource.

func (*DatadogPodAutoscalerTarget) DeepCopy

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

func (*DatadogPodAutoscalerTarget) DeepCopyInto

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

type DatadogPodAutoscalerTargetType

type DatadogPodAutoscalerTargetType string

DatadogPodAutoscalerTargetType defines the type of the target. +kubebuilder:validation:Enum:=PodResource;ContainerResource

const (
	// DatadogPodAutoscalerResourceTargetType allows to set POD-level resources targets.
	DatadogPodAutoscalerResourceTargetType DatadogPodAutoscalerTargetType = "PodResource"

	// DatadogPodAutoscalerContainerResourceTargetType allows to set container-level resources targets.
	DatadogPodAutoscalerContainerResourceTargetType DatadogPodAutoscalerTargetType = "ContainerResource"
)

type DatadogPodAutoscalerTargetValue

type DatadogPodAutoscalerTargetValue struct {
	// Type specifies how the value is expressed (Absolute or Utilization).
	Type DatadogPodAutoscalerTargetValueType `json:"type"`

	// Absolute defines the absolute value of the target (for instance 500 millicores).
	Absolute *resource.Quantity `json:"absolute,omitempty"`

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

DatadogPodAutoscalerTargetValue defines the value of the target.

func (*DatadogPodAutoscalerTargetValue) DeepCopy

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

func (*DatadogPodAutoscalerTargetValue) DeepCopyInto

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

type DatadogPodAutoscalerTargetValueType

type DatadogPodAutoscalerTargetValueType string

DatadogPodAutoscalerTargetValueType specifies the type of metric being targeted, and should be either kubebuilder:validation:Enum:=Absolute;Utilization

const (
	// DatadogPodAutoscalerAbsoluteTargetValueType is the target type for absolute values
	DatadogPodAutoscalerAbsoluteTargetValueType DatadogPodAutoscalerTargetValueType = "Absolute"

	// DatadogPodAutoscalerUtilizationTargetValueType declares a MetricTarget is an AverageUtilization value
	DatadogPodAutoscalerUtilizationTargetValueType DatadogPodAutoscalerTargetValueType = "Utilization"
)

type DatadogPodAutoscalerUpdatePolicy

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

DatadogPodAutoscalerUpdatePolicy defines the policy to update target resource.

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

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

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

type DatadogPodAutoscalerValueSource

type DatadogPodAutoscalerValueSource string

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

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"
)

type DatadogPodAutoscalerVerticalAction

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

	// Version is the recommendation version 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

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"
)

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

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"`

	// 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

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 DatadogSLO

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

	Spec   DatadogSLOSpec   `json:"spec,omitempty"`
	Status DatadogSLOStatus `json:"status,omitempty"`
}

DatadogSLO allows a user to define and manage datadog SLOs from Kubernetes cluster. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=datadogslos,scope=Namespaced,shortName=ddslo +kubebuilder:printcolumn:name="id",type="string",JSONPath=".status.id" +kubebuilder:printcolumn:name="sync status",type="string",JSONPath=".status.syncStatus" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true +genclient

func (*DatadogSLO) DeepCopy

func (in *DatadogSLO) DeepCopy() *DatadogSLO

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

func (*DatadogSLO) DeepCopyInto

func (in *DatadogSLO) DeepCopyInto(out *DatadogSLO)

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

func (*DatadogSLO) DeepCopyObject

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

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

type DatadogSLOControllerOptions

type DatadogSLOControllerOptions struct {
	// DisableRequiredTags disables the automatic addition of required tags to SLOs.
	DisableRequiredTags *bool `json:"disableRequiredTags,omitempty"`
}

DatadogSLOControllerOptions defines options in the DatadogSLO controller. +k8s:openapi-gen=true

func (*DatadogSLOControllerOptions) DeepCopy

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

func (*DatadogSLOControllerOptions) DeepCopyInto

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

type DatadogSLOList

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

DatadogSLOList contains a list of DatadogSLOs. +kubebuilder:object:root=true

func (*DatadogSLOList) DeepCopy

func (in *DatadogSLOList) DeepCopy() *DatadogSLOList

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

func (*DatadogSLOList) DeepCopyInto

func (in *DatadogSLOList) DeepCopyInto(out *DatadogSLOList)

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

func (*DatadogSLOList) DeepCopyObject

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

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

type DatadogSLOQuery

type DatadogSLOQuery struct {
	// Numerator is a Datadog metric query for good events.
	Numerator string `json:"numerator"`
	// Denominator is a Datadog metric query for total (valid) events.
	Denominator string `json:"denominator"`
}

+k8s:openapi-gen=true

func (*DatadogSLOQuery) DeepCopy

func (in *DatadogSLOQuery) DeepCopy() *DatadogSLOQuery

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

func (*DatadogSLOQuery) DeepCopyInto

func (in *DatadogSLOQuery) DeepCopyInto(out *DatadogSLOQuery)

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

type DatadogSLOSpec

type DatadogSLOSpec struct {
	// Name is the name of the service level objective.
	Name string `json:"name"`

	// Description is a user-defined description of the service level objective.
	// Always included in service level objective responses (but may be null). Optional in create/update requests.
	Description *string `json:"description,omitempty"`

	// Groups is a list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.
	// Included in service level objective responses if it is not empty.
	// Optional in create/update requests for monitor service level objectives, but may only be used when the length of the monitor_ids field is one.
	// +listType=set
	Groups []string `json:"groups,omitempty"`

	// MonitorIDs is a list of monitor IDs that defines the scope of a monitor service level objective. Required if type is monitor.
	// +listType=set
	MonitorIDs []int64 `json:"monitorIDs,omitempty"`

	// Tags is a list of tags to associate with your service level objective.
	// This can help you categorize and filter service level objectives in the service level objectives page of the UI.
	// Note: it's not currently possible to filter by these tags when querying via the API.
	// +listType=set
	Tags []string `json:"tags,omitempty"`

	// Query is the query for a metric-based SLO. Required if type is metric.
	// Note that only the `sum by` aggregator is allowed, which sums all request counts. `Average`, `max`, nor `min` request aggregators are not supported.
	Query *DatadogSLOQuery `json:"query,omitempty"`

	// Type is the type of the service level objective.
	Type DatadogSLOType `json:"type"`

	// The SLO time window options.
	Timeframe DatadogSLOTimeFrame `json:"timeframe"`

	// TargetThreshold is the target threshold such that when the service level indicator is above this threshold over the given timeframe, the objective is being met.
	TargetThreshold resource.Quantity `json:"targetThreshold"`

	// WarningThreshold is a optional warning threshold such that when the service level indicator is below this value for the given threshold, but above the target threshold, the objective appears in a "warning" state. This value must be greater than the target threshold.
	WarningThreshold *resource.Quantity `json:"warningThreshold,omitempty"`

	// ControllerOptions are the optional parameters in the DatadogSLO controller
	ControllerOptions *DatadogSLOControllerOptions `json:"controllerOptions,omitempty"`
}

+k8s:openapi-gen=true

func (*DatadogSLOSpec) DeepCopy

func (in *DatadogSLOSpec) DeepCopy() *DatadogSLOSpec

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

func (*DatadogSLOSpec) DeepCopyInto

func (in *DatadogSLOSpec) DeepCopyInto(out *DatadogSLOSpec)

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

type DatadogSLOStatus

type DatadogSLOStatus struct {
	// Conditions represents the latest available observations of the state of a DatadogSLO.
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// ID is the SLO ID generated in Datadog.
	ID string `json:"id,omitempty"`

	// Creator is the identity of the SLO creator.
	Creator string `json:"creator,omitempty"`

	// Created is the time the SLO was created.
	Created *metav1.Time `json:"created,omitempty"`

	// SyncStatus shows the health of syncing the SLO state to Datadog.
	SyncStatus DatadogSLOSyncStatus `json:"syncStatus,omitempty"`

	// LastForceSyncTime is the last time the API SLO was last force synced with the DatadogSLO resource.
	LastForceSyncTime *metav1.Time `json:"lastForceSyncTime,omitempty"`

	// CurrentHash tracks the hash of the current DatadogSLOSpec to know
	// if the Spec has changed and needs an update.
	CurrentHash string `json:"currentHash,omitempty"`
}

DatadogSLOStatus defines the observed state of a DatadogSLO. +k8s:openapi-gen=true

func (*DatadogSLOStatus) DeepCopy

func (in *DatadogSLOStatus) DeepCopy() *DatadogSLOStatus

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

func (*DatadogSLOStatus) DeepCopyInto

func (in *DatadogSLOStatus) DeepCopyInto(out *DatadogSLOStatus)

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

type DatadogSLOSyncStatus

type DatadogSLOSyncStatus string

DatadogSLOSyncStatus is the message reflecting the health of SLO state syncs to Datadog.

const (
	// DatadogSLOSyncStatusOK means syncing is OK.
	DatadogSLOSyncStatusOK DatadogSLOSyncStatus = "OK"
	// DatadogSLOSyncStatusValidateError means there is a SLO validation error.
	DatadogSLOSyncStatusValidateError DatadogSLOSyncStatus = "error validating SLO"
	// DatadogSLOSyncStatusUpdateError means there is a SLO update error.
	DatadogSLOSyncStatusUpdateError DatadogSLOSyncStatus = "error updating SLO"
	// DatadogSLOSyncStatusCreateError means there is an error getting the SLO.
	DatadogSLOSyncStatusCreateError DatadogSLOSyncStatus = "error creating SLO"
)

type DatadogSLOTimeFrame

type DatadogSLOTimeFrame string
const (
	DatadogSLOTimeFrame7d  DatadogSLOTimeFrame = "7d"
	DatadogSLOTimeFrame30d DatadogSLOTimeFrame = "30d"
	DatadogSLOTimeFrame90d DatadogSLOTimeFrame = "90d"
)

type DatadogSLOType

type DatadogSLOType string
const (
	DatadogSLOTypeMetric  DatadogSLOType = "metric"
	DatadogSLOTypeMonitor DatadogSLOType = "monitor"
)

func (DatadogSLOType) IsValid

func (t DatadogSLOType) IsValid() bool

type MonitorStateSyncStatusMessage

type MonitorStateSyncStatusMessage string

MonitorStateSyncStatusMessage is the message reflecting the health of monitor state syncs to Datadog

const (
	// MonitorStateSyncStatusOK means syncing is OK
	MonitorStateSyncStatusOK MonitorStateSyncStatusMessage = "OK"
	// MonitorStateSyncStatusValidateError means there is a monitor validation error
	MonitorStateSyncStatusValidateError MonitorStateSyncStatusMessage = "error validating monitor"
	// MonitorStateSyncStatusUpdateError means there is a monitor update error
	MonitorStateSyncStatusUpdateError MonitorStateSyncStatusMessage = "error updating monitor"
	// SyncStatusGetError means there is an error getting the monitor
	MonitorStateSyncStatusGetError MonitorStateSyncStatusMessage = "error getting monitor"
)

type Override

type Override struct {
	// Configure the basic configurations for an Agent container
	// Valid Agent container names are: `agent`
	// +optional
	Containers map[commonv1.AgentContainerName]*Container `json:"containers,omitempty"`

	// If specified, indicates the pod's priority. "system-node-critical" and
	// "system-cluster-critical" are two special keywords which indicate the
	// highest priorities with the former being the highest priority. Any other
	// name must be defined by creating a PriorityClass object with that name.
	// If not specified, the pod priority will be default or zero if there is no
	// default.
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// The deployment strategy to use to replace existing pods with new ones.
	// Valid types are `RollingUpdate` or `OnDelete` for DaemonSets
	// +optional
	UpdateStrategy *commonv1.UpdateStrategy `json:"updateStrategy,omitempty"`

	// Labels provide labels that are added to the Datadog Agent pods.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

func (*Override) DeepCopy

func (in *Override) DeepCopy() *Override

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

func (*Override) DeepCopyInto

func (in *Override) DeepCopyInto(out *Override)

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

type ProfileAffinity

type ProfileAffinity struct {
	ProfileNodeAffinity []corev1.NodeSelectorRequirement `json:"profileNodeAffinity,omitempty"`
}

func (*ProfileAffinity) DeepCopy

func (in *ProfileAffinity) DeepCopy() *ProfileAffinity

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

func (*ProfileAffinity) DeepCopyInto

func (in *ProfileAffinity) DeepCopyInto(out *ProfileAffinity)

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