Skip to content

Commit

Permalink
fixed multitenancy opts
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Sep 24, 2024
1 parent d4bc969 commit 73a18e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $ctx := dict "helm" . }}
{{- $tenant := ternary "multitenant" "0" .Values.enableMultitenancy }}
{{- $isMultitenant := .Values.enableMultitenancy }}
{{- $tenant := ternary "multitenant" "0" $isMultitenant }}
{{- range $i, $zone := .Values.availabilityZones }}
{{- if $zone.vmagent.enabled }}
{{- if (($zone.vmagent).spec).remoteWrite }}
Expand Down Expand Up @@ -30,6 +31,9 @@ metadata:
{{- end }}
{{- end }}
{{- $_ := set $spec "remoteWrite" (concat $remoteWrites ($spec.remoteWrites | default list)) }}
{{- if $isMultitenant }}
{{- $_ := set $spec "remoteWriteSettings" (dict "useMultitenantMode" true) }}
{{- end }}
spec: {{ toYaml $spec | nindent 2 }}
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions charts/victoria-metrics-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ common:
vmagent:
# -- Common VMAgent spec, which can be overriden by each VMAgent configuration.
# Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmagentspec)
spec:
remoteWriteSettings:
useMultiTenantMode: true
spec: {}
vmcluster:
# -- Common VMCluster spec, which can be overriden by each VMCluster configuration.
# Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmclusterspec)
Expand Down

0 comments on commit 73a18e9

Please sign in to comment.