Skip to content

Commit 0450be4

Browse files
authored
Add ServiceAccount doc (#2574)
* Add ServiceAccount doc Signed-off-by: Yuri Sa <[email protected]> * Add ServiceAccount doc Signed-off-by: Yuri Sa <[email protected]> --------- Signed-off-by: Yuri Sa <[email protected]>
1 parent 788d171 commit 0450be4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,27 @@ EOF
189189

190190
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.
191191

192+
### Using imagePullSecrets
193+
194+
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:
195+
196+
* Create Service Account.
197+
````bash
198+
kubectl create serviceaccount <service-account-name>
199+
````
200+
201+
* Create an imagePullSecret.
202+
````bash
203+
kubectl create secret docker-registry <secret-name> --docker-server=<registry name> \
204+
--docker-username=DUMMY_USERNAME --docker-password=DUMMY_DOCKER_PASSWORD \
205+
--docker-email=DUMMY_DOCKER_EMAIL
206+
````
207+
208+
* Add image pull secret to service account
209+
````bash
210+
kubectl patch serviceaccount <service-account-name> -p '{"imagePullSecrets": [{"name": "<secret-name>"}]}'
211+
````
212+
192213
### OpenTelemetry auto-instrumentation injection
193214

194215
The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Apache HTTPD, DotNet, Go, Java, Nginx, NodeJS and Python are supported.

0 commit comments

Comments
 (0)