{{- range .Values.metricsStorages }}
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMCluster
metadata:
  name: {{ .name }}
spec:
  replicationFactor: 2
  retentionPeriod: "3"
  vminsert:
    replicaCount: 2
    resources: {}
  vmselect:
    replicaCount: 2
    extraArgs:
      search.maxUniqueTimeseries: "600000"
      vmalert.proxyURL: http://vmalert.{{ $.Release.Namespace }}.svc:8080
      dedup.minScrapeInterval: "15s"
    cacheMountPath: /select-cache
    storage:
      volumeClaimTemplate:
        spec:
          resources:
            requests:
              storage: 2Gi
  vmstorage:
    replicaCount: 2
    storage:
      volumeClaimTemplate:
        spec:
          resources:
            requests:
              storage: {{ .storage }}
    storageDataPath: /vm-data
{{- end }}
