diff --git a/chart/templates/helm-release.yaml b/chart/templates/helm-release.yaml index f441c76f..0b34f121 100644 --- a/chart/templates/helm-release.yaml +++ b/chart/templates/helm-release.yaml @@ -27,9 +27,16 @@ spec: name: vc-{{ .Release.Name }} key: config {{- with .Values.missionControl }} + {{- $global := $ }} {{- $customValues := dict }} - {{- $_ := set $customValues "global" (dict "otel" (dict "labels" (printf "org.id=%s,tenant.slug=%s" .clerkOrgID .tenantSlug))) }} + + {{- $otelDict := dict "otel" (dict "labels" (printf "org.id=%s,tenant.slug=%s" .clerkOrgID $global.Values.tenantSlug)) }} + {{- $labelsDict := dict "labels" (dict "flanksource.com/clerk-org-id" .clerkOrgID ) }} + + {{- $globalDict := dict "global" (merge (dict "otel" (dict "labels" $otelDict.otel.labels)) $labelsDict) }} + + {{- $_ := set $customValues "global" $globalDict.global }} {{- $mergedValues := mergeOverwrite . $customValues }} values: {{- toYaml $mergedValues | nindent 4 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 6f5b5e48..fa13ed99 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -8,6 +8,8 @@ missionControl: clerkJWKSURL: "" clerkOrgID: "" global: + labels: + flanksource.com/clerk-org-id: '' otel: collector: grafana-agent-traces.default:4317 db: