Skip to content
Draft
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
6 changes: 6 additions & 0 deletions api/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,12 @@ type OtelCollectorFeatureConfig struct {
// +listType=atomic
Ports []*corev1.ContainerPort `json:"ports,omitempty"`

// Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
// If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
// Default: true
// +optional
CreateRbac *bool `json:"createRbac,omitempty"`

// OTelCollector Config Relevant to the Core agent
// +optional
CoreConfig *CoreConfig `json:"coreConfig,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.

7 changes: 7 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.

12 changes: 12 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagentinternals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,12 @@ spec:
the core agent.
type: string
type: object
createRbac:
description: |-
Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
Default: true
type: boolean
enabled:
description: |-
Enabled enables the OTel Agent.
Expand Down Expand Up @@ -9214,6 +9220,12 @@ spec:
the core agent.
type: string
type: object
createRbac:
description: |-
Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
Default: true
type: boolean
enabled:
description: |-
Enabled enables the OTel Agent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,10 @@
},
"type": "object"
},
"createRbac": {
"description": "Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.\nIf true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API\nDefault: true",
"type": "boolean"
},
"enabled": {
"description": "Enabled enables the OTel Agent.\nDefault: false",
"type": "boolean"
Expand Down Expand Up @@ -9095,6 +9099,10 @@
},
"type": "object"
},
"createRbac": {
"description": "Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.\nIf true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API\nDefault: true",
"type": "boolean"
},
"enabled": {
"description": "Enabled enables the OTel Agent.\nDefault: false",
"type": "boolean"
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagentprofiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,12 @@ spec:
the core agent.
type: string
type: object
createRbac:
description: |-
Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
Default: true
type: boolean
enabled:
description: |-
Enabled enables the OTel Agent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,10 @@
},
"type": "object"
},
"createRbac": {
"description": "Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.\nIf true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API\nDefault: true",
"type": "boolean"
},
"enabled": {
"description": "Enabled enables the OTel Agent.\nDefault: false",
"type": "boolean"
Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,12 @@ spec:
the core agent.
type: string
type: object
createRbac:
description: |-
Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
Default: true
type: boolean
enabled:
description: |-
Enabled enables the OTel Agent.
Expand Down Expand Up @@ -9264,6 +9270,12 @@ spec:
the core agent.
type: string
type: object
createRbac:
description: |-
Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.
If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API
Default: true
type: boolean
enabled:
description: |-
Enabled enables the OTel Agent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,10 @@
},
"type": "object"
},
"createRbac": {
"description": "Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.\nIf true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API\nDefault: true",
"type": "boolean"
},
"enabled": {
"description": "Enabled enables the OTel Agent.\nDefault: false",
"type": "boolean"
Expand Down Expand Up @@ -9160,6 +9164,10 @@
},
"type": "object"
},
"createRbac": {
"description": "Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector.\nIf true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API\nDefault: true",
"type": "boolean"
},
"enabled": {
"description": "Enabled enables the OTel Agent.\nDefault: false",
"type": "boolean"
Expand Down
1 change: 1 addition & 0 deletions docs/configuration.v2alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ spec:
| features.otelCollector.coreConfig.enabled | Marks otelcollector as enabled in core agent. |
| features.otelCollector.coreConfig.extensionTimeout | Extension URL provides the timout of the ddflareextension to the core agent. |
| features.otelCollector.coreConfig.extensionURL | Extension URL provides the URL of the ddflareextension to the core agent. |
| features.otelCollector.createRbac | Set CreateRbac to false to prevent automatic creation of ClusterRole for the otelCollector. If true, check OTel Collector config for k8sattributes processor and create required ClusterRole to access Kubernetes API Default: true |
| features.otelCollector.enabled | Enables the OTel Agent. Default: false |
| features.otelCollector.ports | Contains the ports for the otel-agent. Defaults: otel-grpc:4317 / otel-http:4318. Note: setting 4317 or 4318 manually is *only* supported if name match default names (otel-grpc, otel-http). If not, this will lead to a port conflict. This limitation will be lifted once annotations support is removed. |
| features.otlp.receiver.protocols.grpc.enabled | Enable the OTLP/gRPC endpoint. Host port is enabled by default and can be disabled. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
defaultLogContainerSymlinksPath string = "/var/log/containers"

defaultOtelCollectorEnabled bool = false
defaultOtelCollectorCreateRBAC bool = true
defaultLiveProcessCollectionEnabled bool = false
defaultLiveContainerCollectionEnabled bool = true
defaultProcessDiscoveryEnabled bool = true
Expand Down Expand Up @@ -246,6 +247,7 @@ func defaultFeaturesConfig(ddaSpec *v2alpha1.DatadogAgentSpec) {
ddaSpec.Features.OtelCollector = &v2alpha1.OtelCollectorFeatureConfig{}
}
apiutils.DefaultBooleanIfUnset(&ddaSpec.Features.OtelCollector.Enabled, defaultOtelCollectorEnabled)
apiutils.DefaultBooleanIfUnset(&ddaSpec.Features.OtelCollector.CreateRbac, defaultOtelCollectorCreateRBAC)

// LiveProcessCollection Feature
if ddaSpec.Features.LiveProcessCollection == nil {
Expand Down
Loading
Loading