From c1ac1df2bf06cc84265ab6df99bbf37fd313338c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 3 Mar 2021 14:53:08 +0100 Subject: [PATCH] Add doc and e2e for sidecar (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 93 ++++++++++++++++++++- tests/e2e/smoke-sidecar/00-install.yaml | 22 +++++ tests/e2e/smoke-sidecar/01-assert.yaml | 13 +++ tests/e2e/smoke-sidecar/01-install-app.yaml | 19 +++++ tests/e2e/smoke-simplest/00-assert.yaml | 2 +- 5 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 tests/e2e/smoke-sidecar/00-install.yaml create mode 100644 tests/e2e/smoke-sidecar/01-assert.yaml create mode 100644 tests/e2e/smoke-sidecar/01-install-app.yaml diff --git a/README.md b/README.md index f18eecba14..5fadfa33bf 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ spec: protocols: grpc: processors: - queued_retry: exporters: logging: @@ -38,10 +37,11 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [queued_retry] + processors: [] exporters: [logging] EOF ``` + **_WARNING:_** Until the OpenTelemetry Collector format is stable, changes may be required in the above example to remain compatible with the latest version of the OpenTelemetry Collector image being referenced. @@ -53,7 +53,94 @@ At this point, the Operator does *not* validate the contents of the configuratio ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. + +#### Sidecar injection + +A sidecar with the OpenTelemetry Collector can be injected into pod-based workloads by setting the pod annotation `sidecar.opentelemetry.io/inject` to either `"true"`, or to the name of a concrete `OpenTelemetryCollector` from the same namespace, like in the following example: + +```console +$ kubectl apply -f - <