Skip to content

Commit

Permalink
Fix API violation from OTel Agent (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
swang392 authored Jan 7, 2025
1 parent 87f8143 commit db00883
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
9 changes: 5 additions & 4 deletions api/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ type OtelCollectorFeatureConfig struct {
// If not, this will lead to a port conflict.
// This limitation will be lifted once annotations support is removed.
// +optional
// +listType=atomic
Ports []*corev1.ContainerPort `json:"ports,omitempty"`

// OTelCollector Config Relevant to the Core agent
Expand All @@ -718,15 +719,15 @@ type CoreConfig struct {
// +optional
Enabled *bool `json:"enabled,omitempty"`

// +optional
// Extension URL provides the URL of the ddflareextension to
// the core agent.
ExtensionURL *string `json:"extension_url,omitempty"`

// +optional
ExtensionURL *string `json:"extensionURL,omitempty"`

// Extension URL provides the timout of the ddflareextension to
// the core agent.
ExtensionTimeout *int `json:"extension_timeout,omitempty"`
// +optional
ExtensionTimeout *int `json:"extensionTimeout,omitempty"`
}

// AdmissionControllerFeatureConfig contains the Admission Controller feature configuration.
Expand Down
9 changes: 7 additions & 2 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.

10 changes: 6 additions & 4 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1352,12 +1352,12 @@ spec:
enabled:
description: Enabled marks otelcollector as enabled in core agent.
type: boolean
extension_timeout:
extensionTimeout:
description: |-
Extension URL provides the timout of the ddflareextension to
the core agent.
type: integer
extension_url:
extensionURL:
description: |-
Extension URL provides the URL of the ddflareextension to
the core agent.
Expand Down Expand Up @@ -1411,6 +1411,7 @@ spec:
- containerPort
type: object
type: array
x-kubernetes-list-type: atomic
type: object
otlp:
description: OTLP ingest configuration
Expand Down Expand Up @@ -8215,12 +8216,12 @@ spec:
enabled:
description: Enabled marks otelcollector as enabled in core agent.
type: boolean
extension_timeout:
extensionTimeout:
description: |-
Extension URL provides the timout of the ddflareextension to
the core agent.
type: integer
extension_url:
extensionURL:
description: |-
Extension URL provides the URL of the ddflareextension to
the core agent.
Expand Down Expand Up @@ -8274,6 +8275,7 @@ spec:
- containerPort
type: object
type: array
x-kubernetes-list-type: atomic
type: object
otlp:
description: OTLP ingest configuration
Expand Down
14 changes: 8 additions & 6 deletions config/crd/bases/v1/datadoghq.com_datadogagents_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1407,11 +1407,11 @@
"description": "Enabled marks otelcollector as enabled in core agent.",
"type": "boolean"
},
"extension_timeout": {
"extensionTimeout": {
"description": "Extension URL provides the timout of the ddflareextension to\nthe core agent.",
"type": "integer"
},
"extension_url": {
"extensionURL": {
"description": "Extension URL provides the URL of the ddflareextension to\nthe core agent.",
"type": "string"
}
Expand Down Expand Up @@ -1457,7 +1457,8 @@
],
"type": "object"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
Expand Down Expand Up @@ -8212,11 +8213,11 @@
"description": "Enabled marks otelcollector as enabled in core agent.",
"type": "boolean"
},
"extension_timeout": {
"extensionTimeout": {
"description": "Extension URL provides the timout of the ddflareextension to\nthe core agent.",
"type": "integer"
},
"extension_url": {
"extensionURL": {
"description": "Extension URL provides the URL of the ddflareextension to\nthe core agent.",
"type": "string"
}
Expand Down Expand Up @@ -8262,7 +8263,8 @@
],
"type": "object"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration.v2alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ spec:
| features.otelCollector.conf.configMap.items | Maps a ConfigMap data `key` to a file `path` mount. |
| features.otelCollector.conf.configMap.name | Is the name of the ConfigMap. |
| features.otelCollector.coreConfig.enabled | Marks otelcollector as enabled in core agent. |
| features.otelCollector.coreConfig.extension_timeout | Extension URL provides the timout of the ddflareextension to the core agent. |
| features.otelCollector.coreConfig.extension_url | Extension URL provides the URL of the ddflareextension to the 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.enabled | Enables the OTel Agent. Default: true |
| 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

0 comments on commit db00883

Please sign in to comment.