I have installed an OT Operator for Kubernetes, I now need to create an OT collector instance to start collecting and reporting metrics. The example on the page is super simple
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config: |
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
logging:
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
However my config has a bit more to it and requires an api key which I would like to pass in as an env variable. Is there anyway to do that?
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config: |
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
logging:
otlp:
endpoint: $ENDPOINT
headers:
api-key: $API_KEY
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]