Jaeger v2 via OpenTelemetry operator - provide elasticsearch username and password via Kubernetes secret? #6778
-
In the old operator syntax, we could do (simplified): apiVersion: jaegertracing.io/v1
kind: Jaeger
spec:
storage:
elasticsearch:
name: elasticsearch
nodeCount: 3
redundancyPolicy: SingleRedundancy
options:
es.server-urls: 'https://elasticjaegersearch-es-http.elastic-system.svc:9200'
secretName: elasticsearch-jaeger # <-- this
type: elasticsearch Which would allow us to provide the ES_USERNAME and ES_PASSWORD required to connect to elasticsearch via a secret (in this case, called I cannot find out whether or not the new v2 via OpenTelemetry operator supports anything similar. We have (from: https://docs.google.com/document/d/1rabu8zvjoZeHx-HNqvK5kjsujMEBC7DkR2MYeOvB6HI/edit?tab=t.0): auth:
basic:
password: and auth:
basic:
username: and auth:
basic:
password_file: But the format of the password file is unknown/undocumented, and there is no comment on whether the old environment variables which would be provided by a secret (e.g., ES_USERNAME and ES_PASSWORD) are still supported or how to get them into the container. Thoughts are appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Yes, the new Jaeger v2 via OpenTelemetry operator does support providing Elasticsearch username and password via Kubernetes secrets, similar to the old operator syntax. You can configure this by specifying a secret that contains the environment variables apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
name: simple-prod
spec:
strategy: production
storage:
type: elasticsearch
options:
es:
server-urls: https://quickstart-es-http.default.svc:9200
index-prefix: my-prefix
tls:
ca: /es/certificates/ca.crt
secretName: jaeger-secret
volumeMounts:
- name: certificates
mountPath: /es/certificates/
readOnly: true
volumes:
- name: certificates
secret:
secretName: quickstart-es-http-certs-public You can create the secret using the following command: kubectl create secret generic jaeger-secret --from-literal=ES_PASSWORD=password --from-literal=ES_USERNAME=elastic This setup allows you to continue using Kubernetes secrets to manage your Elasticsearch credentials [1]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
I do not believe the v2 operator supports orchestration for storage (since the operator is really just the official OTEL operator that does not deal with storage). You need to
|
Beta Was this translation helpful? Give feedback.
Because operator does not deal with storage you cannot pass storage params via spec. You need to create a custom OTEL collector config (example) and pass it as a whole. Within that config you can specify
auth:
If you then want to customize those credential values via env vars, you can change the config accordingly