datadog-operator
datadog-operator copied to clipboard
Add OTLP ingest feature
What does this PR do?
Add otlp feature to configure OTLP ingest.
Motivation
Allow users to configure this feature via the Datadog operator.
Additional Notes
Configuration has the same schema as DataDog/helm-charts/pull/619. This is slightly different from the Agent's, since it has the enabled flags explicitly.
As it happens in the Helm chart, this PR only adds support for defining an OTLP/gRPC endpoint with a host and port, and not via a Unix socket.
Describe your test plan
Test the Datadog operator with the following test cases:
- [ ] Setting the gRPC endpoint to
unix:/path/to/socket.sockresults in an error - [ ] Setting the gRPC endpoint to
unix-abstract:opaquedataresults in an error - [ ] Setting the gRPC endpoint to
0.0.0.0results in an error - [ ] Setting the HTTP endpoint to
0.0.0.0results in an error - [ ] Setting both endpoints with an explicit port works correctly.
- [ ] Only setting gRPC endpoint works correctly.
- [ ] Only setting HTTP endpoint works correctly.
- [ ] Setting the gRPC section with enabled:true and no endpoint works with the default value.
- [ ] Setting the HTTP section with enabled:true and no endpoint works with the default value.
- [ ] Setting both sections with enabled:true and no endpoint works with the default value.
- [ ] Not setting anything related to OTLP works correctly.