added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,40 @@
{{- $ctx := dict "helm" . }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
{{- $ns := include "vm.namespace" $ctx }}
{{- if and (empty .Values.configMap) .Values.config }}
{{- $cfg := deepCopy .Values.config }}
{{- if .Values.extraScrapeConfigs }}
{{- $_ := set $cfg "scrape_configs" (concat (.Values.config.scrape_configs | default list) .Values.extraScrapeConfigs) }}
{{- end }}
{{- $data := toYaml (omit $cfg "useTpl") }}
{{- if $cfg.useTpl }}
{{- $data = tpl $data . }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "vmagent.scrape.config.name" $ctx }}
namespace: {{ $ns }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
data:
scrape.yml: |{{ $data | nindent 4 }}
{{- end }}
{{- $rwcm := default dict }}
{{- range $i, $rw := .Values.remoteWrite }}
{{- range $rwKey, $rwValue := $rw }}
{{- if or (kindIs "slice" $rwValue) (kindIs "map" $rwValue) }}
{{- $_ := set $rwcm (printf "%d-%s.yaml" $i $rwKey) (toYaml $rwValue) }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- with (include "vmagent.rw.config" .) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullname }}-rw
namespace: {{ $ns }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
data: {{ . | nindent 2 }}
{{- end }}