Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3486,16 +3486,21 @@ menu:
identifier: containers_datadog_operator_crd_dashboard
parent: containers_datadog_operator
weight: 807
- name: DatadogGenericResource CRD
url: containers/datadog_operator/crd_ddgr
identifier: containers_datadog_operator_crd_ddgr
parent: containers_datadog_operator
weight: 808
- name: DatadogMonitor CRD
url: containers/datadog_operator/crd_monitor
identifier: containers_datadog_operator_crd_monitor
parent: containers_datadog_operator
weight: 808
weight: 809
- name: DatadogSLO CRD
url: containers/datadog_operator/crd_slo
identifier: containers_datadog_operator_crd_slo
parent: containers_datadog_operator
weight: 809
weight: 810
- name: Troubleshooting
url: containers/troubleshooting/
parent: containers
Expand Down
9 changes: 7 additions & 2 deletions config/_default/menus/main.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3189,16 +3189,21 @@ menu:
identifier: containers_datadog_operator_crd_dashboard
parent: containers_datadog_operator
weight: 707
- name: DatadogGenericResource CRD
url: containers/datadog_operator/crd_ddgr
identifier: containers_datadog_operator_crd_ddgr
parent: containers_datadog_operator
weight: 708
- name: DatadogMonitor CRD
url: containers/datadog_operator/crd_monitor
identifier: containers_datadog_operator_crd_monitor
parent: containers_datadog_operator
weight: 708
weight: 709
- name: DatadogSLO CRD
url: containers/datadog_operator/crd_slo
identifier: containers_datadog_operator_crd_slo
parent: containers_datadog_operator
weight: 709
weight: 710
- name: Datadog CSI Driver
url: containers/csi_driver
parent: containers
Expand Down
9 changes: 7 additions & 2 deletions config/_default/menus/main.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3194,16 +3194,21 @@ menu:
identifier: containers_datadog_operator_crd_dashboard
parent: containers_datadog_operator
weight: 707
- name: DatadogGenericResource CRD
url: containers/datadog_operator/crd_ddgr
identifier: containers_datadog_operator_crd_ddgr
parent: containers_datadog_operator
weight: 708
- name: DatadogMonitor CRD
url: containers/datadog_operator/crd_monitor
identifier: containers_datadog_operator_crd_monitor
parent: containers_datadog_operator
weight: 708
weight: 709
- name: DatadogSLO CRD
url: containers/datadog_operator/crd_slo
identifier: containers_datadog_operator_crd_slo
parent: containers_datadog_operator
weight: 709
weight: 710
- name: Datadog CSI Driver
url: containers/csi_driver
parent: containers
Expand Down
9 changes: 7 additions & 2 deletions config/_default/menus/main.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3194,16 +3194,21 @@ menu:
identifier: containers_datadog_operator_crd_dashboard
parent: containers_datadog_operator
weight: 707
- name: DatadogGenericResource CRD
url: containers/datadog_operator/crd_ddgr
identifier: containers_datadog_operator_crd_ddgr
parent: containers_datadog_operator
weight: 708
- name: DatadogMonitor CRD
url: containers/datadog_operator/crd_monitor
identifier: containers_datadog_operator_crd_monitor
parent: containers_datadog_operator
weight: 708
weight: 709
- name: DatadogSLO CRD
url: containers/datadog_operator/crd_slo
identifier: containers_datadog_operator_crd_slo
parent: containers_datadog_operator
weight: 709
weight: 710
- name: Datadog CSI Driver
url: containers/csi_driver
parent: containers
Expand Down
9 changes: 7 additions & 2 deletions config/_default/menus/main.ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3194,16 +3194,21 @@ menu:
identifier: containers_datadog_operator_crd_dashboard
parent: containers_datadog_operator
weight: 707
- name: DatadogGenericResource CRD
url: containers/datadog_operator/crd_ddgr
identifier: containers_datadog_operator_crd_ddgr
parent: containers_datadog_operator
weight: 708
- name: DatadogMonitor CRD
url: containers/datadog_operator/crd_monitor
identifier: containers_datadog_operator_crd_monitor
parent: containers_datadog_operator
weight: 708
weight: 709
- name: DatadogSLO CRD
url: containers/datadog_operator/crd_slo
identifier: containers_datadog_operator_crd_slo
parent: containers_datadog_operator
weight: 709
weight: 710
- name: Datadog CSI Driver
url: containers/csi_driver
parent: containers
Expand Down
3 changes: 3 additions & 0 deletions content/en/containers/datadog_operator/crd_dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: DatadogDashboard CRD
description: Deploy and manage Datadog dashboards using the DatadogDashboard custom resource definition with the Datadog Operator
---

<div class="alert alert-info"><strong>Soft deprecation notice:</strong> For new dashboard resources, prefer <a href="/containers/datadog_operator/crd_ddgr/">DatadogGenericResource</a> with <code>type: dashboard</code>. <code>DatadogDashboard</code> remains supported for existing users, but DatadogGenericResource is the preferred path for new Datadog API capabilities.</div>

To deploy a Datadog dashboard, you can use the Datadog Operator and `DatadogDashboard` custom resource definition (CRD).

### Prerequisites
Expand Down
93 changes: 93 additions & 0 deletions content/en/containers/datadog_operator/crd_ddgr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: DatadogGenericResource CRD
description: Create and manage Datadog resources using the DatadogGenericResource custom resource definition with the Datadog Operator
further_reading:
- link: "https://github.com/DataDog/datadog-operator/blob/main/docs/datadoggenericresource/datadog_generic_resource.md"
tag: "GitHub"
text: "DatadogGenericResource guide"
- link: "https://github.com/DataDog/datadog-operator/blob/main/docs/datadoggenericresource/datadog_generic_resource_migration.md"
tag: "GitHub"
text: "Migrating to DatadogGenericResource"
---

To create and manage Datadog resources with the Datadog Operator, use the `DatadogGenericResource` custom resource definition (CRD). `DatadogGenericResource` uses the Datadog API JSON payload for each supported resource type in `spec.jsonSpec`.

`DatadogGenericResource` is the preferred CRD for Datadog resources that are supported by both `DatadogGenericResource` and older resource-specific CRDs, such as `DatadogMonitor`, `DatadogDashboard`, and `DatadogSLO`.

## Prerequisites
- [Helm][1]
- [`kubectl` CLI][2]
- [Datadog Operator][3] v1.12+
- Datadog API and application keys with permissions for the resources you create

## Supported resources

| Type | Operator version | API reference |
| ---- | ---------------- | ------------- |
| `notebook` | v1.12.0 | [Create a notebook][4] |
| `synthetics_api_test` | v1.12.0 | [Create an API test][5] |
| `synthetics_browser_test` | v1.12.0 | [Create a browser test][6] |
| `monitor` | v1.13.0 | [Create a monitor][7] |
| `downtime` | v1.22.0 | [Schedule a downtime][8] |
| `dashboard` | v1.27.0 | [Create a dashboard][9] |
| `slo` | v1.28.0 | [Create an SLO object][10] |

## Setup

1. Run the installation command, substituting your Datadog API and application keys:

```shell
helm install datadog-operator datadog/datadog-operator \
--set apiKey=<DATADOG_API_KEY> \
--set appKey=<DATADOG_APP_KEY> \
--set datadogCRDs.crds.datadogGenericResources=true \
--set datadogGenericResource.enabled=true
```

2. Create a file with the spec of your `DatadogGenericResource` configuration.

**Example**: Monitor

{{< code-block lang="yaml" filename="datadog-generic-resource-monitor.yaml" collapsible="true" >}}
apiVersion: datadoghq.com/v1alpha1
kind: DatadogGenericResource
metadata:
name: example-monitor
namespace: <operator namespace>
spec:
type: monitor
jsonSpec: |-
{
"name": "Example Monitor",
"type": "metric alert",
"query": "avg(last_10m):avg:system.cpu.user{*} > 80",
"message": "CPU usage is high",
"tags": [
"team:example"
],
"options": {
"notify_no_data": false
}
}
{{< /code-block >}}

3. Deploy your `DatadogGenericResource`:

```shell
kubectl apply -f /path/to/your/datadog-generic-resource-monitor.yaml
```

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: https://helm.sh/
[2]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
[3]: /containers/kubernetes/installation?tab=datadogoperator#installation
[4]: /api/latest/notebooks/#create-a-notebook
[5]: /api/latest/synthetics/#create-an-api-test
[6]: /api/latest/synthetics/#create-a-browser-test
[7]: /api/latest/monitors/#create-a-monitor
[8]: /api/latest/downtimes/#schedule-a-downtime
[9]: /api/latest/dashboards/#create-a-new-dashboard
[10]: /api/latest/service-level-objectives/#create-an-slo-object
2 changes: 2 additions & 0 deletions content/en/containers/datadog_operator/crd_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ further_reading:
text: "DatadogMonitor CRD"
---

<div class="alert alert-info"><strong>Soft deprecation notice:</strong> For new monitor resources, prefer <a href="/containers/datadog_operator/crd_ddgr/">DatadogGenericResource</a> with <code>type: monitor</code>. <code>DatadogMonitor</code> remains supported for existing users, but DatadogGenericResource is the preferred path for new Datadog API capabilities.</div>

To deploy a Datadog monitor, you can use the Datadog Operator and `DatadogMonitor` custom resource definition (CRD).

## Prerequisites
Expand Down
6 changes: 4 additions & 2 deletions content/en/containers/datadog_operator/crd_slo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: DatadogSLO CRD
description: Create and manage Datadog Service Level Objectives (SLOs) using the DatadogSLO custom resource definition
---

<div class="alert alert-info"><strong>Soft deprecation notice:</strong> For new SLO resources, prefer <a href="/containers/datadog_operator/crd_ddgr/">DatadogGenericResource</a> with <code>type: slo</code>. <code>DatadogSLO</code> remains supported for existing users, but DatadogGenericResource is the preferred path for new Datadog API capabilities.</div>

To create a [Service Level Objective][1] (SLO), you can use the Datadog Operator and `DatadogSLO` custom resource definition (CRD).

### Prerequisites
Expand All @@ -21,7 +23,7 @@ To create a [Service Level Objective][1] (SLO), you can use the Datadog Operator
kind: DatadogSLO
metadata:
name: example-slo-monitor3
namespace: system
namespace: system
spec:
name: example-slo-monitor3
description: "This is an example monitor SLO from datadog-operator"
Expand All @@ -42,7 +44,7 @@ To create a [Service Level Objective][1] (SLO), you can use the Datadog Operator
kind: DatadogSLO
metadata:
name: example-slo
namespace: system
namespace: system
spec:
name: example-slo
description: "This is an example metric SLO from datadog-operator"
Expand Down
Loading