v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

+groupName=monitor.datadog.kubeform.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: monitor.GroupName, Version: "v1alpha1"}

Functions

func GetDecoder

func GetDecoder() map[string]jsoniter.ValDecoder

func GetEncoder

func GetEncoder() map[string]jsoniter.ValEncoder

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Json added in v0.4.0

type Json struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              JsonSpec   `json:"spec,omitempty"`
	Status            JsonStatus `json:"status,omitempty"`
}

func (*Json) DeepCopy added in v0.4.0

func (in *Json) DeepCopy() *Json

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

func (*Json) DeepCopyInto added in v0.4.0

func (in *Json) DeepCopyInto(out *Json)

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

func (*Json) DeepCopyObject added in v0.4.0

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

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

func (*Json) SetupWebhookWithManager added in v0.4.0

func (r *Json) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Json) ValidateCreate added in v0.4.0

func (r *Json) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Json) ValidateDelete added in v0.4.0

func (r *Json) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Json) ValidateUpdate added in v0.4.0

func (r *Json) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type JsonList added in v0.4.0

type JsonList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Json CRD objects
	Items []Json `json:"items,omitempty"`
}

JsonList is a list of Jsons

func (*JsonList) DeepCopy added in v0.4.0

func (in *JsonList) DeepCopy() *JsonList

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

func (*JsonList) DeepCopyInto added in v0.4.0

func (in *JsonList) DeepCopyInto(out *JsonList)

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

func (*JsonList) DeepCopyObject added in v0.4.0

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

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

type JsonSpec added in v0.4.0

type JsonSpec struct {
	State *JsonSpecResource `json:"state,omitempty" tf:"-"`

	Resource JsonSpecResource `json:"resource" tf:"resource"`

	UpdatePolicy base.UpdatePolicy `json:"updatePolicy,omitempty" tf:"-"`

	TerminationPolicy base.TerminationPolicy `json:"terminationPolicy,omitempty" tf:"-"`

	ProviderRef core.LocalObjectReference `json:"providerRef" tf:"-"`

	BackendRef *core.LocalObjectReference `json:"backendRef,omitempty" tf:"-"`
}

func (*JsonSpec) DeepCopy added in v0.4.0

func (in *JsonSpec) DeepCopy() *JsonSpec

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

func (*JsonSpec) DeepCopyInto added in v0.4.0

func (in *JsonSpec) DeepCopyInto(out *JsonSpec)

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

type JsonSpecResource added in v0.4.0

type JsonSpecResource struct {
	ID string `json:"id,omitempty" tf:"id,omitempty"`

	// The JSON formatted definition of the monitor.
	Monitor *string `json:"monitor" tf:"monitor"`
	// The URL of the monitor.
	// +optional
	Url *string `json:"url,omitempty" tf:"url"`
}

func (*JsonSpecResource) DeepCopy added in v0.4.0

func (in *JsonSpecResource) DeepCopy() *JsonSpecResource

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

func (*JsonSpecResource) DeepCopyInto added in v0.4.0

func (in *JsonSpecResource) DeepCopyInto(out *JsonSpecResource)

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

type JsonStatus added in v0.4.0

type JsonStatus struct {
	// Resource generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// +optional
	Phase status.Status `json:"phase,omitempty"`
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

func (*JsonStatus) DeepCopy added in v0.4.0

func (in *JsonStatus) DeepCopy() *JsonStatus

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

func (*JsonStatus) DeepCopyInto added in v0.4.0

func (in *JsonStatus) DeepCopyInto(out *JsonStatus)

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

type Monitor

type Monitor struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MonitorSpec   `json:"spec,omitempty"`
	Status            MonitorStatus `json:"status,omitempty"`
}

func (*Monitor) DeepCopy

func (in *Monitor) DeepCopy() *Monitor

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

func (*Monitor) DeepCopyInto

func (in *Monitor) DeepCopyInto(out *Monitor)

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

func (*Monitor) DeepCopyObject

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

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

func (*Monitor) SetupWebhookWithManager

func (r *Monitor) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Monitor) ValidateCreate

func (r *Monitor) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Monitor) ValidateDelete

func (r *Monitor) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Monitor) ValidateUpdate

func (r *Monitor) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MonitorList

type MonitorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Monitor CRD objects
	Items []Monitor `json:"items,omitempty"`
}

MonitorList is a list of Monitors

func (*MonitorList) DeepCopy

func (in *MonitorList) DeepCopy() *MonitorList

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

func (*MonitorList) DeepCopyInto

func (in *MonitorList) DeepCopyInto(out *MonitorList)

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

func (*MonitorList) DeepCopyObject

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

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

type MonitorSpec

type MonitorSpec struct {
	State *MonitorSpecResource `json:"state,omitempty" tf:"-"`

	Resource MonitorSpecResource `json:"resource" tf:"resource"`

	UpdatePolicy base.UpdatePolicy `json:"updatePolicy,omitempty" tf:"-"`

	TerminationPolicy base.TerminationPolicy `json:"terminationPolicy,omitempty" tf:"-"`

	ProviderRef core.LocalObjectReference `json:"providerRef" tf:"-"`

	BackendRef *core.LocalObjectReference `json:"backendRef,omitempty" tf:"-"`
}

func (*MonitorSpec) DeepCopy

func (in *MonitorSpec) DeepCopy() *MonitorSpec

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

func (*MonitorSpec) DeepCopyInto

func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec)

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

type MonitorSpecMonitorThresholdWindows

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

func (*MonitorSpecMonitorThresholdWindows) DeepCopy

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

func (*MonitorSpecMonitorThresholdWindows) DeepCopyInto

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

type MonitorSpecMonitorThresholdWindowsCodec

type MonitorSpecMonitorThresholdWindowsCodec struct {
}

+k8s:deepcopy-gen=false

func (MonitorSpecMonitorThresholdWindowsCodec) Decode

func (MonitorSpecMonitorThresholdWindowsCodec) Encode

func (MonitorSpecMonitorThresholdWindowsCodec) IsEmpty

type MonitorSpecMonitorThresholds

type MonitorSpecMonitorThresholds struct {
	// The monitor `CRITICAL` threshold. Must be a number.
	// +optional
	Critical *string `json:"critical,omitempty" tf:"critical"`
	// The monitor `CRITICAL` recovery threshold. Must be a number.
	// +optional
	CriticalRecovery *string `json:"criticalRecovery,omitempty" tf:"critical_recovery"`
	// The monitor `OK` threshold. Must be a number.
	// +optional
	Ok *string `json:"ok,omitempty" tf:"ok"`
	// The monitor `UNKNOWN` threshold. Must be a number.
	// +optional
	Unknown *string `json:"unknown,omitempty" tf:"unknown"`
	// The monitor `WARNING` threshold. Must be a number.
	// +optional
	Warning *string `json:"warning,omitempty" tf:"warning"`
	// The monitor `WARNING` recovery threshold. Must be a number.
	// +optional
	WarningRecovery *string `json:"warningRecovery,omitempty" tf:"warning_recovery"`
}

func (*MonitorSpecMonitorThresholds) DeepCopy

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

func (*MonitorSpecMonitorThresholds) DeepCopyInto

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

type MonitorSpecMonitorThresholdsCodec

type MonitorSpecMonitorThresholdsCodec struct {
}

+k8s:deepcopy-gen=false

func (MonitorSpecMonitorThresholdsCodec) Decode

func (MonitorSpecMonitorThresholdsCodec) Encode

func (MonitorSpecMonitorThresholdsCodec) IsEmpty

type MonitorSpecResource

type MonitorSpecResource struct {
	ID string `json:"id,omitempty" tf:"id,omitempty"`

	// A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to `false`.
	// +optional
	EnableLogsSample *bool `json:"enableLogsSample,omitempty" tf:"enable_logs_sample"`
	// A message to include with a re-notification. Supports the `@username` notification allowed elsewhere.
	// +optional
	EscalationMessage *string `json:"escalationMessage,omitempty" tf:"escalation_message"`
	// (Only applies to metric alert) 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 will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.
	// +optional
	EvaluationDelay *int64 `json:"evaluationDelay,omitempty" tf:"evaluation_delay"`
	// A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).
	// +optional
	ForceDelete *bool `json:"forceDelete,omitempty" tf:"force_delete"`
	// Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to `false`.
	// +optional
	GroupbySimpleMonitor *bool `json:"groupbySimpleMonitor,omitempty" tf:"groupby_simple_monitor"`
	// A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to `true`.
	// +optional
	IncludeTags *bool `json:"includeTags,omitempty" tf:"include_tags"`
	// A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to `false`.
	// +optional
	Locked *bool `json:"locked,omitempty" tf:"locked"`
	// A message to include with notifications for this monitor.
	//
	// Email notifications can be sent to specific users by using the same `@username` notation as events.
	Message *string `json:"message" tf:"message"`
	// A mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m` . Can only be used for, and are required for, anomaly monitors.
	// +optional
	MonitorThresholdWindows *MonitorSpecMonitorThresholdWindows `json:"monitorThresholdWindows,omitempty" tf:"monitor_threshold_windows"`
	// Alert thresholds of the monitor.
	// +optional
	MonitorThresholds *MonitorSpecMonitorThresholds `json:"monitorThresholds,omitempty" tf:"monitor_thresholds"`
	// Name of Datadog monitor.
	Name *string `json:"name" tf:"name"`
	// The time (in seconds) to skip evaluations for new groups.
	//
	// `new_group_delay` overrides `new_host_delay` if it is set to a nonzero value.
	// +optional
	NewGroupDelay *int64 `json:"newGroupDelay,omitempty" tf:"new_group_delay"`
	// **Deprecated**. See `new_group_delay`. 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. This value is ignored for simple monitors and monitors not grouped by host. Defaults to `300`. The only case when this should be used is to override the default and set `new_host_delay` to zero for monitors grouped by host.
	// +optional
	// Deprecated
	NewHostDelay *int64 `json:"newHostDelay,omitempty" tf:"new_host_delay"`
	// The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes.
	//
	// We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.
	// +optional
	NoDataTimeframe *int64 `json:"noDataTimeframe,omitempty" tf:"no_data_timeframe"`
	// A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to `false`.
	// +optional
	NotifyAudit *bool `json:"notifyAudit,omitempty" tf:"notify_audit"`
	// A boolean indicating whether this monitor will notify when data stops reporting. Defaults to `false`.
	// +optional
	NotifyNoData *bool `json:"notifyNoData,omitempty" tf:"notify_no_data"`
	// Integer from 1 (high) to 5 (low) indicating alert severity.
	// +optional
	Priority *int64 `json:"priority,omitempty" tf:"priority"`
	// The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the [API Reference](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor) for details. `terraform plan` will validate query contents unless `validate` is set to `false`.
	//
	// **Note:** APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the [detailed doc](https://docs.datadoghq.com/tracing/guide/ddsketch_trace_metrics/).
	Query *string `json:"query" tf:"query"`
	// The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.
	// +optional
	RenotifyInterval *int64 `json:"renotifyInterval,omitempty" tf:"renotify_interval"`
	// The number of re-notification messages that should be sent on the current status.
	// +optional
	RenotifyOccurrences *int64 `json:"renotifyOccurrences,omitempty" tf:"renotify_occurrences"`
	// The types of statuses for which re-notification messages should be sent.
	// +optional
	RenotifyStatuses []string `json:"renotifyStatuses,omitempty" tf:"renotify_statuses"`
	// 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 will be skipped. Default: `true` for `on average`, `at all times` and `in total` aggregation. `false` otherwise.
	// +optional
	RequireFullWindow *bool `json:"requireFullWindow,omitempty" tf:"require_full_window"`
	// +optional
	RestrictedRoles []string `json:"restrictedRoles,omitempty" tf:"restricted_roles"`
	// A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
	// +optional
	Tags []string `json:"tags,omitempty" tf:"tags"`
	// The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state.
	// +optional
	TimeoutH *int64 `json:"timeoutH,omitempty" tf:"timeout_h"`
	// The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API [documentation page](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor). Note: The monitor type cannot be changed after a monitor is created.
	Type *string `json:"type" tf:"type"`
	// If set to `false`, skip the validation call done during plan.
	// +optional
	Validate *bool `json:"validate,omitempty" tf:"validate"`
}

func (*MonitorSpecResource) DeepCopy

func (in *MonitorSpecResource) DeepCopy() *MonitorSpecResource

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

func (*MonitorSpecResource) DeepCopyInto

func (in *MonitorSpecResource) DeepCopyInto(out *MonitorSpecResource)

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

type MonitorStatus

type MonitorStatus struct {
	// Resource generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// +optional
	Phase status.Status `json:"phase,omitempty"`
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

func (*MonitorStatus) DeepCopy

func (in *MonitorStatus) DeepCopy() *MonitorStatus

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

func (*MonitorStatus) DeepCopyInto

func (in *MonitorStatus) DeepCopyInto(out *MonitorStatus)

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