Skip to content

Commit 31012b7

Browse files
committed
fix: fix environmental variables for OTEL exporter
1 parent de80967 commit 31012b7

File tree

1 file changed

+11
-11
lines changed
  • charts/gitops-runtime/templates/_components/gitops-operator

1 file changed

+11
-11
lines changed

charts/gitops-runtime/templates/_components/gitops-operator/_env.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ PROMOTION_WRAPPER_TEMPLATE: {{ .Values.config.promotionWrapperTemplate | quote }
2222
RUNTIME: {{ .Values.global.runtime.name }}
2323
TASK_POLLING_INTERVAL: {{ .Values.config.taskPollingInterval }}
2424
WORKFLOW_MONITOR_POLLING_INTERVAL: {{ .Values.config.workflowMonitorPollingInterval }}
25+
{{- $accountId := .Values.global.codefresh.accountId -}}
26+
{{- $runtimeName := .Values.global.runtime.name -}}
27+
{{- $otelResourceAttributes := printf "service.name=gitops-operator,cf.account.id=%s,cf.gitops.runtime.name=%s" $accountId $runtimeName -}}
28+
OTEL_RESOURCE_ATTRIBUTES: {{ $otelResourceAttributes }}
29+
A_CF_TOKEN:
30+
valueFrom:
31+
secretKeyRef:
32+
name: codefresh-token
33+
key: token
34+
optional: true
35+
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=$(A_CF_TOKEN)"
2536
{{- end }}
2637

2738
{{- define "gitops-operator.resources.environment-variables.defaults" -}}
@@ -45,15 +56,4 @@ RUNTIME_VERSION:
4556
configMapKeyRef:
4657
name: codefresh-cm
4758
key: version
48-
{{- $accountId := .Values.global.codefresh.accountId -}}
49-
{{- $runtimeName := .Values.global.runtime.name -}}
50-
{{- $otelResourceAttributes := printf "service.name=gitops-operator,cf.account.id=%s,cf.gitops.runtime.name=%s" $accountId $runtimeName -}}
51-
OTEL_RESOURCE_ATTRIBUTES: {{ $otelResourceAttributes }}
52-
A_CF_TOKEN:
53-
valueFrom:
54-
secretKeyRef:
55-
name: codefresh-token
56-
key: token
57-
optional: true
58-
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=$(A_CF_TOKEN)"
5959
{{- end -}}

0 commit comments

Comments
 (0)