From 53ed1d6f345b44e40c718e41179dff798087172b Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:27:49 +0100 Subject: [PATCH] Add ServiceAccount doc (#2574) * Add ServiceAccount doc Signed-off-by: Yuri Sa * Add ServiceAccount doc Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 7cba0aead5..af492a368c 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,27 @@ EOF When using sidecar mode the OpenTelemetry collector container will have the environment variable `OTEL_RESOURCE_ATTRIBUTES`set with Kubernetes resource attributes, ready to be consumed by the [resourcedetection](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor) processor. +### Using imagePullSecrets + +The OpenTelemetry Collector defines a ServiceAccount field which could be set to run collector instances with a specific Service and their properties (e.g. imagePullSecrets). Therefore, if you have a constraint to run your collector with a private container registry, you should follow the procedure below: + +* Create Service Account. +````bash +kubectl create serviceaccount +```` + +* Create an imagePullSecret. +````bash +kubectl create secret docker-registry --docker-server= \ + --docker-username=DUMMY_USERNAME --docker-password=DUMMY_DOCKER_PASSWORD \ + --docker-email=DUMMY_DOCKER_EMAIL +```` + +* Add image pull secret to service account +````bash +kubectl patch serviceaccount -p '{"imagePullSecrets": [{"name": ""}]}' +```` + ### OpenTelemetry auto-instrumentation injection The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Apache HTTPD, DotNet, Go, Java, Nginx, NodeJS and Python are supported.