VictoriaMetrics / helm-charts

Helm charts for VictoriaMetrics, VictoriaLogs and ecosystem
https://victoriametrics.github.io/helm-charts/
Apache License 2.0
343 stars 332 forks source link

bug: horizontalPodAutoscaler values are ignored in vmcluster #1769

Open fmunteanu opened 2 hours ago

fmunteanu commented 2 hours ago

Chart name and version chart: victoria-metrics-k8s-stack version: v0.28.4

Describe the bug The horizontalPodAutoscaler values are ignored in vmcluster, see below the related custom values for vmstorage:

vmcluster:
  enabled: true
  spec:
    replicationFactor: 2
    vmstorage:
      horizontalPodAutoscaler:
        enabled: true
        maxReplicas: 4
        metrics:
        - resource:
            name: memory
            target:
              averageUtilization: 90
              type: Utilization
          type: Resource
        minReplicas: 2
      resources:
        limits:
          cpu: null
          memory: 1Gi
        requests:
          cpu: 10m
          memory: 1Gi
      storage:
        volumeClaimTemplate:
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
            storageClassName: longhorn
vmsingle:
  enabled: false

I lowered in purpose the resources memory limit, to test the autoscaling. Also, how does replicationFactor relates to autoscaling, should I set it to 1? Thank you for letting me know what am I missing.

AndrewChubatiuk commented 2 hours ago

there's no horizontalPodAutoscaler option for vmcluster.spec.vmstorage please check available options here https://docs.victoriametrics.com/operator/api/#vmclusterspec

fmunteanu commented 2 hours ago

Thank you @AndrewChubatiuk, I think this is a quite important feature to add into VMKS chart. I'm constantly forced to fine tune the 3 vmcluster components resources. Enabling autoscaling should address the issue.

AndrewChubatiuk commented 2 hours ago

please create an issue in operator repo to add a support for this

fmunteanu commented 2 hours ago

Done, thank you again for taking the time to look into this! I created https://github.com/VictoriaMetrics/operator/issues/1164.