From afb0f2bb03e9ff90786405df572f2f87c886d06e Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Mon, 13 May 2024 14:07:01 +0545 Subject: [PATCH] tenant id in chart --- chart/templates/deployment.yaml | 10 ++++++++++ chart/values.yaml | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 8c568c20c..8264e8f33 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -69,6 +69,12 @@ spec: {{- if .Values.db.runMigrations}} - --db-migrations {{- end}} + {{- if (tpl .Values.otel.collector .) }} + - --otel-collector-url={{ tpl .Values.otel.collector . | default "" }} + {{- end }} + {{- if (tpl .Values.otel.serviceName .) }} + - --otel-service-name={{ tpl .Values.otel.serviceName . | default "config-db" }} + {{- end }} {{- if .Values.upstream.enabled}} envFrom: - secretRef: @@ -90,6 +96,10 @@ spec: - name: UPSTREAM_PAGE_SIZE value: '{{ .Values.upstream.pageSize }}' {{- end}} + {{- if .Values.tenant.id}} + - name: OTEL_LABELS + value: '{{ .Values.tenant.id }}' + {{- end}} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/chart/values.yaml b/chart/values.yaml index 1a29be8a5..b4fa13662 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -30,6 +30,15 @@ configAnalysisRetentionDays: 60 scrapeRuleConfigMaps: - config-db-rules +otel: + # OpenTelemetry gRPC collector endpoint in host:port format + collector: "" + serviceName: config-db + +# tenant details to be used in the traces +tenant: + id: "" + db: runMigrations: true embedded: