Skip to content

Commit de80967

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

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,13 @@ CACHE_PASSWORD:
226226
{{- $runtimeName := .Values.global.runtime.name -}}
227227
{{- $otelResourceAttributes := printf "service.name=app-proxy,cf.account.id=%s,cf.gitops.runtime.name=%s" $accountId $runtimeName -}}
228228
OTEL_RESOURCE_ATTRIBUTES: {{ $otelResourceAttributes }}
229-
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer $(RUNTIME_TOKEN)"
229+
A_RUNTIME_TOKEN:
230+
valueFrom:
231+
secretKeyRef:
232+
name: codefresh-token
233+
key: token
234+
optional: true
235+
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=$(A_RUNTIME_TOKEN)"
230236
{{- end -}}
231237

232238
{{/*

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,11 @@ RUNTIME_VERSION:
4949
{{- $runtimeName := .Values.global.runtime.name -}}
5050
{{- $otelResourceAttributes := printf "service.name=gitops-operator,cf.account.id=%s,cf.gitops.runtime.name=%s" $accountId $runtimeName -}}
5151
OTEL_RESOURCE_ATTRIBUTES: {{ $otelResourceAttributes }}
52-
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer $(CF_TOKEN)"
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)"
5359
{{- end -}}

0 commit comments

Comments
 (0)