OpenTelemetryCollector with prometheusremotewrite Exporter and basicauth Extension using Env Vars #45509
Replies: 1 comment
-
|
Managed to get to work using a Secret, mounting it and reading the username and password from files, as per https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/basicauthextension/README.md extraVolumes:
- name: observability
secret:
secretName: observability
extraVolumeMounts:
- mountPath: /etc/secrets
name: observability
readOnly: true
config:
basicauth/observability:
client_auth:
username_file: /etc/secrets/username
password_file: /etc/secrets/password
exporters:
prometheusremotewrite/observability:
endpoint: ...
auth:
authenticator: basicauth/observability
service:
extensions:
- basicauth/observability
pipelines:
metrics:
exporters: [prometheusremotewrite/observability] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm currently encountering a bit of a weird issue, that I'm not able to resolve. Hopefully someone might spot my mistake right away :)
If this is not the correct place to ask this question, please let me know.
Components Used
What I'm Trying To Do
Export Prometheus metrics to an external Prometheus instance using the Opentelemetry Collecor running in Kubernetes.
OpenTelemetryCollector Configuration
The Problem
The
basicauthExtension does only work, if I set the username and password in clear text. If I try to reference them using env vars, the authentication fails with a 403.On the other hand, setting the Authorization header works using the credentials from an env var.
Is this expected behaviour? Or should configuring the basicauth extension with env vars work?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions