consul-k8s icon indicating copy to clipboard operation
consul-k8s copied to clipboard

Backport of Datadog Integration Acceptance Tests / Bug fixes into release/1.2.x

Open hc-github-team-consul-core opened this issue 10 months ago • 0 comments

Backport

This PR is auto-generated from #3685 to be assessed for backporting due to the inclusion of the label backport/1.2.x.

:rotating_light:

Warning automatic cherry-pick of commits failed. If the first commit failed, you will see a blank no-op commit below. If at least one commit succeeded, you will see the cherry-picked commits up to, not including, the commit where the merge conflict occurred.

The person who merged in the original PR is: @natemollica-nm This person should manually cherry-pick the original PR into a new backport PR, and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/consul-k8s/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Changes proposed in this PR

  • Introduce datadog integration acceptance testing with Datadog API
    • Consul Integration
    • DogstatsD (Unix Domain Sockets)
    • DogstatsD (UDP)
    • Openmetrics Prometheus
    • OTLP Collection Integration (HTTP)
    • OTLP Collection Integration (gRPC)
  • Fix some bugs surrounding the Openmetrics and Consul Integration Checks
    • Consul Checks also require prometheus.io annotations to be removed while enabled to avoid conflicts w/ dd-agent
    • Fix Openmetrics and Consul Integration check URLs to use consul.fullname-server helper template for accurate consul API access
    • Fix OTLP collection for telemetry-collector-deployment.yaml to include OTEL_EXPORTER_OTLP_ENDPOINT env variable for proper Datadog tag ingestion

How I've tested this PR

  • Ran: make bats-test for templating updates
  • Ran acceptance tests for new Datadog framework and test scenarios following CONTRIBUTING.md guide.

How I expect reviewers to test this PR

  • Review acceptance tests and see if they're worth even having in the repository. They add a few more go dependencies for Datadog client API access
    • The tests access the datadog agent's local API with datadog dogstatsd stats enabled to parse metrics output from the collection event.
    • This testing leverages the Datadog fake-intake image to simulate traffic ingestion and remove the requirement to have to use an API and APP key.

Checklist


Overview of commits
  • 8e09172d79299cc4b62174500454b3c3314c8591 - cad42f1b253e357d3bbe28496bc45beccd34f142 - 61d4b2d9f1b0815da87bfd36075f151d7186977b - bb068a4dee7874397bce6b07f6f6a5dbaad99969 - 8a13734b677aceaab262b060e78f99fc8a2fa7fa - e60a93927880c48e82f7e1b4dc27965c0b2683d8 - 13b708938e0665cfa820065e9becf2f5afc499ce - 59dccfd93e71c3b6dca07f8ec97b0c66fa44e6b8 - 7a31b1da59f6e150b1f29d9e08ba7ed10c67c84b - b14f5db225e4020c49320c8a016d85cf1a3554cb - 4233e7571be58941f0c61c28c3da4d770a957bbb - a49b6cbfb9c75ea72638c383a5f7900e45c33153 - 4b1dbc140cc76ebfa0a6a0371ee18fb7498c30d8 - 694e9df8b2322bce4a7f4e2c75e3df67bf678f29 - 11f460392d28182312d3b59aade4403d11bc46bb - aa495c457fdbdc8c41f6193ac52c988e180b3fa1 - 3b4287ccb74403400f5b974774dac2e7349b2df4 - 9e77ced8331145035524c2f52582089268af8608 - 401b7498afeaefea98e97a15203d76fa1af60968 - 51df717fcde7508da58ab04b911def2376fcfed6 - dee86b136904206a3561a0e7599a550232cd65b0 - e79c6ea2071d7930629c4b1e09d2a1554b375c64 - 88e8a65ca0c8c86f1d41eb1f5d9a5ef68d773c68 - de58b9962c69381e3f21f44efb59467d4776e854 - 943f4dd2f61e65638618d1363258f4233ff88452 - 47eec97981e4b10053fe7b6023ac29e3f94d2fbd - 0bd8838be5e46ebfb472cb6f6727a83858144667 - 0f8cd4f5debd56d57eed5491d74b758ba00d4ec3 - 69c81d75b5abda9fe6a098390a8e68b3d5a985ab - 70f7390bc96294f1f39c5bae24e1bd039a43aff2 - 078c2d000321295fdfd28a3b9c497c484939e7ed - 91abb5d31b645933e40bda50c5c99748be018159 - 55f94fa5d4b8643204edc7a8c138602a84d18196