Skip to content
Merged
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
3 changes: 3 additions & 0 deletions api/datadoghq/v1alpha1/datadogagentinternal_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ type DatadogAgentInternalStatus struct {
// The actual state of the Cluster Checks Runner as a deployment.
// +optional
ClusterChecksRunner *v2alpha1.DeploymentStatus `json:"clusterChecksRunner,omitempty"`
// The actual state of the OTel Agent Gateway as a deployment.
// +optional
OtelAgentGateway *v2alpha1.DeploymentStatus `json:"otelAgentGateway,omitempty"`
// RemoteConfigConfiguration stores the configuration received from RemoteConfig.
// +optional
RemoteConfigConfiguration *v2alpha1.RemoteConfigConfiguration `json:"remoteConfigConfiguration,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/datadoghq/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions api/datadoghq/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions api/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const (
ClusterAgentComponentName ComponentName = "clusterAgent"
// ClusterChecksRunnerComponentName is the name of the Cluster Check Runner
ClusterChecksRunnerComponentName ComponentName = "clusterChecksRunner"
// OtelAgentGatewayComponentName is the name of the OTel Agent Gateway
OtelAgentGatewayComponentName ComponentName = "otelAgentGateway"
)

// DatadogAgentSpec defines the desired state of DatadogAgent
Expand Down Expand Up @@ -2253,6 +2255,9 @@ type DatadogAgentStatus struct {
// The actual state of the Cluster Checks Runner as a deployment.
// +optional
ClusterChecksRunner *DeploymentStatus `json:"clusterChecksRunner,omitempty"`
// The actual state of the OTel Agent Gateway as a deployment.
// +optional
OtelAgentGateway *DeploymentStatus `json:"otelAgentGateway,omitempty"`
// RemoteConfigConfiguration stores the configuration received from RemoteConfig.
// +optional
RemoteConfigConfiguration *RemoteConfigConfiguration `json:"remoteConfigConfiguration,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/datadoghq/v2alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions api/datadoghq/v2alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagentinternals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7991,6 +7991,54 @@ spec:
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
otelAgentGateway:
description: The actual state of the OTel Agent Gateway as a deployment.
properties:
availableReplicas:
description: Total number of available pods (ready for at least minReadySeconds) targeted by this Deployment.
format: int32
type: integer
currentHash:
description: CurrentHash is the stored hash of the Deployment.
type: string
deploymentName:
description: DeploymentName corresponds to the name of the Deployment.
type: string
generatedToken:
description: |-
GeneratedToken corresponds to the generated token if any token was provided in the Credential configuration when ClusterAgent is
enabled.
type: string
lastUpdate:
description: LastUpdate is the last time the status was updated.
format: date-time
type: string
readyReplicas:
description: Total number of ready pods targeted by this Deployment.
format: int32
type: integer
replicas:
description: Total number of non-terminated pods targeted by this Deployment (their labels match the selector).
format: int32
type: integer
state:
description: State corresponds to the Deployment state.
type: string
status:
description: Status corresponds to the Deployment computed status.
type: string
unavailableReplicas:
description: |-
Total number of unavailable pods targeted by this Deployment. This is the total number of
pods that are still required for the Deployment to have 100% available capacity. They may
either be pods that are running but not yet available or pods that still have not been created.
format: int32
type: integer
updatedReplicas:
description: Total number of non-terminated pods targeted by this Deployment that have the desired template spec.
format: int32
type: integer
type: object
remoteConfigConfiguration:
description: RemoteConfigConfiguration stores the configuration received from RemoteConfig.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7807,6 +7807,63 @@
],
"x-kubernetes-list-type": "map"
},
"otelAgentGateway": {
"additionalProperties": false,
"description": "The actual state of the OTel Agent Gateway as a deployment.",
"properties": {
"availableReplicas": {
"description": "Total number of available pods (ready for at least minReadySeconds) targeted by this Deployment.",
"format": "int32",
"type": "integer"
},
"currentHash": {
"description": "CurrentHash is the stored hash of the Deployment.",
"type": "string"
},
"deploymentName": {
"description": "DeploymentName corresponds to the name of the Deployment.",
"type": "string"
},
"generatedToken": {
"description": "GeneratedToken corresponds to the generated token if any token was provided in the Credential configuration when ClusterAgent is\nenabled.",
"type": "string"
},
"lastUpdate": {
"description": "LastUpdate is the last time the status was updated.",
"format": "date-time",
"type": "string"
},
"readyReplicas": {
"description": "Total number of ready pods targeted by this Deployment.",
"format": "int32",
"type": "integer"
},
"replicas": {
"description": "Total number of non-terminated pods targeted by this Deployment (their labels match the selector).",
"format": "int32",
"type": "integer"
},
"state": {
"description": "State corresponds to the Deployment state.",
"type": "string"
},
"status": {
"description": "Status corresponds to the Deployment computed status.",
"type": "string"
},
"unavailableReplicas": {
"description": "Total number of unavailable pods targeted by this Deployment. This is the total number of\npods that are still required for the Deployment to have 100% available capacity. They may\neither be pods that are running but not yet available or pods that still have not been created.",
"format": "int32",
"type": "integer"
},
"updatedReplicas": {
"description": "Total number of non-terminated pods targeted by this Deployment that have the desired template spec.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"remoteConfigConfiguration": {
"additionalProperties": false,
"description": "RemoteConfigConfiguration stores the configuration received from RemoteConfig.",
Expand Down
48 changes: 48 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8041,6 +8041,54 @@ spec:
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
otelAgentGateway:
description: The actual state of the OTel Agent Gateway as a deployment.
properties:
availableReplicas:
description: Total number of available pods (ready for at least minReadySeconds) targeted by this Deployment.
format: int32
type: integer
currentHash:
description: CurrentHash is the stored hash of the Deployment.
type: string
deploymentName:
description: DeploymentName corresponds to the name of the Deployment.
type: string
generatedToken:
description: |-
GeneratedToken corresponds to the generated token if any token was provided in the Credential configuration when ClusterAgent is
enabled.
type: string
lastUpdate:
description: LastUpdate is the last time the status was updated.
format: date-time
type: string
readyReplicas:
description: Total number of ready pods targeted by this Deployment.
format: int32
type: integer
replicas:
description: Total number of non-terminated pods targeted by this Deployment (their labels match the selector).
format: int32
type: integer
state:
description: State corresponds to the Deployment state.
type: string
status:
description: Status corresponds to the Deployment computed status.
type: string
unavailableReplicas:
description: |-
Total number of unavailable pods targeted by this Deployment. This is the total number of
pods that are still required for the Deployment to have 100% available capacity. They may
either be pods that are running but not yet available or pods that still have not been created.
format: int32
type: integer
updatedReplicas:
description: Total number of non-terminated pods targeted by this Deployment that have the desired template spec.
format: int32
type: integer
type: object
remoteConfigConfiguration:
description: RemoteConfigConfiguration stores the configuration received from RemoteConfig.
properties:
Expand Down
57 changes: 57 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagents_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7872,6 +7872,63 @@
],
"x-kubernetes-list-type": "map"
},
"otelAgentGateway": {
"additionalProperties": false,
"description": "The actual state of the OTel Agent Gateway as a deployment.",
"properties": {
"availableReplicas": {
"description": "Total number of available pods (ready for at least minReadySeconds) targeted by this Deployment.",
"format": "int32",
"type": "integer"
},
"currentHash": {
"description": "CurrentHash is the stored hash of the Deployment.",
"type": "string"
},
"deploymentName": {
"description": "DeploymentName corresponds to the name of the Deployment.",
"type": "string"
},
"generatedToken": {
"description": "GeneratedToken corresponds to the generated token if any token was provided in the Credential configuration when ClusterAgent is\nenabled.",
"type": "string"
},
"lastUpdate": {
"description": "LastUpdate is the last time the status was updated.",
"format": "date-time",
"type": "string"
},
"readyReplicas": {
"description": "Total number of ready pods targeted by this Deployment.",
"format": "int32",
"type": "integer"
},
"replicas": {
"description": "Total number of non-terminated pods targeted by this Deployment (their labels match the selector).",
"format": "int32",
"type": "integer"
},
"state": {
"description": "State corresponds to the Deployment state.",
"type": "string"
},
"status": {
"description": "Status corresponds to the Deployment computed status.",
"type": "string"
},
"unavailableReplicas": {
"description": "Total number of unavailable pods targeted by this Deployment. This is the total number of\npods that are still required for the Deployment to have 100% available capacity. They may\neither be pods that are running but not yet available or pods that still have not been created.",
"format": "int32",
"type": "integer"
},
"updatedReplicas": {
"description": "Total number of non-terminated pods targeted by this Deployment that have the desired template spec.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"remoteConfigConfiguration": {
"additionalProperties": false,
"description": "RemoteConfigConfiguration stores the configuration received from RemoteConfig.",
Expand Down
26 changes: 26 additions & 0 deletions examples/datadogagent/datadog-agent-with-otelagentgateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# datadog-agent-with-otelagentgateway.yaml
# This example shows how to enable the OTel Agent Gateway component
# The OTel Agent Gateway runs as a separate deployment and can be used
# to collect and forward OpenTelemetry data.

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
spec:
global:
credentials:
apiSecret:
secretName: datadog-secret
keyName: api-key

features:
# Enable OTel Agent Gateway
otelAgentGateway:
enabled: true

override:
# Optional: Configure the OTel Agent Gateway deployment
otelAgentGateway:
# Number of replicas for the gateway
replicas: 2
2 changes: 2 additions & 0 deletions internal/controller/datadogagent/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const (
AgentReconcileConditionType = "AgentReconcile"
// ClusterChecksRunnerReconcileConditionType ReconcileConditionType for Cluster Checks Runner component
ClusterChecksRunnerReconcileConditionType = "ClusterChecksRunnerReconcile"
// OtelAgentGatewayReconcileConditionType ReconcileConditionType for OTel Agent Gateway component
OtelAgentGatewayReconcileConditionType = "OtelAgentGatewayReconcile"
// OverrideReconcileConflictConditionType ReconcileConditionType for override conflict
OverrideReconcileConflictConditionType = "OverrideReconcileConflict"
// DatadogAgentReconcileErrorConditionType ReconcileConditionType for DatadogAgent reconcile error
Expand Down
7 changes: 7 additions & 0 deletions internal/controller/datadogagent/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ func GetAgentLocalServiceSelector(dda metav1.Object) map[string]string {
}
}

func GetOtelAgentGatewayServiceSelector(dda metav1.Object) map[string]string {
return map[string]string{
kubernetes.AppKubernetesPartOfLabelKey: object.NewPartOfLabelValue(dda).String(),
apicommon.AgentDeploymentComponentLabelKey: constants.DefaultOtelAgentGatewayResourceSuffix,
}
}

// ShouldCreateAgentLocalService returns whether the node agent local service should be created based on the Kubernetes version
func ShouldCreateAgentLocalService(versionInfo *version.Info, forceEnableLocalService bool) bool {
if versionInfo == nil || versionInfo.GitVersion == "" {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2025-present Datadog, Inc.

package otelagentgateway

const (
// pdbMaxUnavailableInstances = 1
// DefaultOtelAgentGatewayReplicas default OTel Agent Gateway deployment replicas
defaultOtelAgentGatewayReplicas = 1
)
Loading
Loading