Skip to content

Commit

Permalink
Merge pull request #54 from flanksource/set-clerk-org-id-label
Browse files Browse the repository at this point in the history
chore: add clerk org id label and fix tenant slug
  • Loading branch information
moshloop authored Jul 9, 2024
2 parents e82e633 + 86a8261 commit 541716e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions chart/templates/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
{{- end }}
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ missionControl:
clerkJWKSURL: ""
clerkOrgID: ""
global:
labels:
flanksource.com/clerk-org-id: ''
otel:
collector: grafana-agent-traces.default:4317
db:
Expand Down

0 comments on commit 541716e

Please sign in to comment.