Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.90.0 update of opentelemetry-operator #62

Merged
merged 1,238 commits into from
Jan 19, 2024
Merged

Conversation

lisguo
Copy link
Contributor

@lisguo lisguo commented Jan 19, 2024

Description of changes:
Pulls in all changes from v0.90.0 of the upstream opentelemetry-operator code. This is based off of of the upstream branch, with the amazon-cloudwatch-agent-operator/main branch merged on top.

New changes:

  • /pkg/collector was moved to /internal/manifests/collector
  • add support for apachehttpd, dotnet, golang, nginx, nodejs, python (but would still need to be enabled via ACWA CR)
  • add support for healthchecks (still needs some steps for enablement)
  • add support for watching statefulsets, horizontalpodautoscaler,poddisruptionbudget
		Owns(&corev1.ConfigMap{}).
		Owns(&corev1.ServiceAccount{}).
		Owns(&corev1.Service{}).
		Owns(&appsv1.Deployment{}).
		Owns(&appsv1.DaemonSet{}).
		Owns(&appsv1.StatefulSet{})

FYI the above change requires changes to the clusterrole to list the new resources. This is reflected in config/rbac but needs to be added to the helm chart.

  • all unit tests were migrated from upstream (still needs some work to run)

Renamed the following:

  • opentelemetry-operator -> amazon-cloudwatch-agent-operator
  • OpenTelemetryCollector -> AmazonCloudWatchAgent
  • opentelemetry.io -> cloudwatch.aws.amazon.com

Things that were unchanged:

  • versions.txt
  • ecr repo for the agent and adot instrumentation are still hardcoded in main.go
  • default instrumentation logic in podmutator.go
  • everything in /config, /helm, /integration-tests, /.github

As part of this upgrade, there was a commit made to migrate the securityContext from the app container to the init container. This however caused issues when I tried to use the sample app in the appsignals-demo. Potentially related to this issue. To resolve this I commented out the following line in pkg/instrumentation/sdk.go

pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, javaInitContainerName)

Testing
I deployed the operator, crds, and clusterroles to my EKS cluster using make deploy. I deployed the sample app in the application-signals-demo. I verified that the java instrumentation sdk is injected:

Init Containers:
  opentelemetry-auto-instrumentation-java:
    Container ID:  containerd://31a8b52c6371918bb3af4db57623e5eadc1f5c8a301b193353b27b95313499f0
    Image:         public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.31.1
    Image ID:      public.ecr.aws/aws-observability/adot-autoinstrumentation-java@sha256:08d05d413361ea2a11e27b4392f6fe856e384136e8d28f995cfc98438aa8a3f2
    Port:          <none>
    Host Port:     <none>
    Command:
      cp
      /javaagent.jar
      /otel-auto-instrumentation-java/javaagent.jar
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Tue, 09 Jan 2024 23:00:17 -0500
      Finished:     Tue, 09 Jan 2024 23:00:17 -0500
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /otel-auto-instrumentation-java from opentelemetry-auto-instrumentation-java (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rkqx7 (ro)

I also applied the AmazonCloudWatchAgent resource and saw the agent running

amazon-cloudwatch   cloudwatch-agent-47dph                          1/1     Running   0              12m
amazon-cloudwatch   cloudwatch-agent-zv9pf                          1/1     Running   0              12m

logs:

2024-01-10T04:48:16Z I! {"caller":"[email protected]/otlp.go:83","msg":"Starting GRPC server","kind":"receiver","name":"otlp/app_signals","data_type":"metrics","endpoint":"0.0.0.0:4315"}
2024-01-10T04:48:16Z W! {"caller":"[email protected]/warning.go:40","msg":"Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks","kind":"receiver","name":"otlp/app_signals","data_type":"metrics","documentation":"https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2024-01-10T04:48:16Z I! {"caller":"[email protected]/otlp.go:101","msg":"Starting HTTP server","kind":"receiver","name":"otlp/app_signals","data_type":"metrics","endpoint":"0.0.0.0:4316"}
2024-01-10T04:48:16Z I! {"caller":"service/service.go:161","msg":"Everything is ready. Begin running and processing data."}

services:

cloudwatch-agent              ClusterIP   10.100.22.172    <none>        4315/TCP,4316/TCP,2000/TCP   57m
cloudwatch-agent-headless     ClusterIP   None             <none>        4315/TCP,4316/TCP,2000/TCP   57m

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dependabot bot and others added 30 commits August 29, 2023 13:25
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…e than one time (#2048)

* Avoid running the instrumentation pod mutator for already instrumented pods

Signed-off-by: Israel Blancas <[email protected]>

* Add missing changelog

Signed-off-by: Israel Blancas <[email protected]>

* Fix E2E tests

Signed-off-by: Israel Blancas <[email protected]>

* Apply changes requested in code review

Signed-off-by: Israel Blancas <[email protected]>

* Add unit test for hte golang and env variable situations

Signed-off-by: Israel Blancas <[email protected]>

* Fix lint

Signed-off-by: Israel Blancas <[email protected]>

---------

Signed-off-by: Israel Blancas <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Co-authored-by: Ben B <[email protected]>
* Make OpenShift Route work with gRPC receivers (#2028)

* Make OpenShift Route work with gRPC receivers

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

---------

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

---------

Signed-off-by: Pavol Loffay <[email protected]>
… (#2077)

Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).

- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kubernetes
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).

- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kubernetes
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).

- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kubernetes
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…p (#2066)

Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.39.0 to 0.40.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@sdk/metric/v0.39.0...sdk/metric/v0.40.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Make OpenShift routes work with missing hostname

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix the changelog entry

Signed-off-by: Pavol Loffay <[email protected]>

* Update .chloggen/route-use-defaults.yaml

Co-authored-by: Israel Blancas <[email protected]>

---------

Signed-off-by: Pavol Loffay <[email protected]>
Co-authored-by: Ben B <[email protected]>
Co-authored-by: Israel Blancas <[email protected]>
* Fixes reconciling Internal Traffic Policy changes and add tests

* add changelog

* issue in changelog
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: update godoc for pod and container security context

Add detailed description of SecurityContext and PodSecurityContext
fields.

* make bundle

* re-run make api-docs
* [.NET AutoInstrumentation] Docker image includes musl library

* Replace ADD by get command

* Remove redundant files from docker image

* Execute all commands in one layer

* Fix passing arguments

* revert to ADD as wget is failing on CI

* Typo fix

Co-authored-by: Paulo Janotti <[email protected]>

---------

Co-authored-by: Paulo Janotti <[email protected]>
* Update go version used in workflows

* Use correct patch version
Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus).

- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.46.0...v0.47.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus).

- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.46.0...v0.47.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* bump dotnet

* Update .chloggen/upgrade-dotnet.yaml
Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator).

- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](prometheus-operator/prometheus-operator@v0.67.1...v0.68.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Remove TargetAllocator resource defaults

* Add changelog entry

* Update e2e test for target allocator

* trigger tests

* Add heads up for change of behaviour
…2120)

Bumps [go.opentelemetry.io/otel/metric](https://github.com/open-telemetry/opentelemetry-go) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/metric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).

- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.16.1...v0.16.2)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kubernetes
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).

- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.16.1...v0.16.2)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kubernetes
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Release 0.84.0

Signed-off-by: Yuri Sa <[email protected]>

* .NET auto-instrumentation include musl in docker image (#2087)

* [.NET AutoInstrumentation] Docker image includes musl library

* Replace ADD by get command

* Remove redundant files from docker image

* Execute all commands in one layer

* Fix passing arguments

* revert to ADD as wget is failing on CI

* Typo fix

Co-authored-by: Paulo Janotti <[email protected]>

---------

Co-authored-by: Paulo Janotti <[email protected]>

* [chore] Update go version used in workflows (#2088)

* Update go version used in workflows

* Use correct patch version

* Bump the prometheus group with 1 update (#2090)

Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus).

- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.46.0...v0.47.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump the prometheus group in /cmd/otel-allocator with 1 update (#2091)

Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus).

- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.46.0...v0.47.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [autoinstrumentation] Bump dotnet to 1.0.0 (#2096)

* bump dotnet

* Update .chloggen/upgrade-dotnet.yaml

* Bump the prometheus group with 1 update (#2101)

Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator).

- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](prometheus-operator/prometheus-operator@v0.67.1...v0.68.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Release 0.84.0

Signed-off-by: Yuri Sa <[email protected]>

* Release 0.84.0

Signed-off-by: Yuri Sa <[email protected]>

* Release 0.84.0

Signed-off-by: Yuri Sa <[email protected]>

* Release 0.84.0

Signed-off-by: Yuri Sa <[email protected]>

---------

Signed-off-by: Yuri Sa <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Piotr Kiełkowicz <[email protected]>
Co-authored-by: Paulo Janotti <[email protected]>
Co-authored-by: bryan-aguilar <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <[email protected]>
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
lisguo and others added 24 commits January 2, 2024 14:25
…s. Fix config issue by using json instead of yaml
@lisguo lisguo force-pushed the v0.90.0-update-all-lang branch from a2e916a to f98b527 Compare January 19, 2024 19:17
@lisguo lisguo merged commit a02591d into aws:main Jan 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.