opentelemetry-helm-charts
opentelemetry-helm-charts copied to clipboard
enhance otel demo env schema
In some scenarios, we want to set some value from k8s metadata to our OTEL_RESOURCE_ATTRIBUTES
, like namespace, we need the configuration below:
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.namespace.name=$(OTEL_K8S_NAMESPACE)
I propose to add the schema to catch the feature described above.
@Frapschen Please bump the chart version.
/cc @wph95 as code owner
@Frapschen Can you open an issue that lays out in more details the issue being solved by this PR? It's possible the solution will end up being a new section in the values.yaml instead.
Are you ready to review this pr? I see that only values.schema.json/chart.yaml has been modified
For the need to add specific envs, I think need to be discussed(might create a issue first). In the absence of a context, I can't tell if this addition is feasible.
But if it's a generic solution for custom environment variables. I think it is necessary (but low priority for me) For example in value.yaml
default:
env:
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.namespace.name=$(OTEL_K8S_NAMESPACE)
It would be great if you could help with the implementation of the custom default env section
@Frapschen I will be gone next week, but @dmitryax @Allex1 and @wph95 can help move this forward.
@wph95 can you have time to review?