Add local.enabled setting and make it work

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
This commit is contained in:
Michel Hollands
2023-06-22 13:18:11 +01:00
parent e57e947019
commit 07f719152e
9 changed files with 80 additions and 9 deletions

View File

@@ -5,3 +5,25 @@
{{- end }}
{{- join ", " $list }}
{{- end }}
{{- define "agent.loki_write_targets" -}}
{{- $list := list }}
{{- if .Values.local.enabled }}
{{- $list = append $list ("loki.write.local.receiver") }}
{{- end }}
{{- if .Values.cloud.enabled }}
{{- $list = append $list ("loki.write.cloud.receiver") }}
{{- end }}
{{- join ", " $list }}
{{- end }}
{{- define "agent.prometheus_write_targets" -}}
{{- $list := list }}
{{- if .Values.local.enabled }}
{{- $list = append $list ("prometheus.remote_write.local.receiver") }}
{{- end }}
{{- if .Values.cloud.enabled }}
{{- $list = append $list ("prometheus.remote_write.cloud.receiver") }}
{{- end }}
{{- join ", " $list }}
{{- end }}