VictoriaMetrics / VictoriaMetrics/operator

VMAgent: disabling HPA does not delete the HPA

Open
#2,518 2 comments 0 reactions 1 assignee View on GitHub

@AndrewChubatiuk is already working on this.

Since Aug 24, 2026.

bug waiting for release
Dominant language
Go
Stars
589
Forks
229
Avg merge
1d 9h
Merged PRs (30d)
77

Description

Removing spec.hpa from a VMAgent leaves its HPA active.

Steps to reproduce

Create a VMAgent with HPA:

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAgent
metadata:
  name: test
spec:
  remoteWrite:
    - url: http://example.invalid/api/v1/write
  resources:
    requests:
      cpu: 100m
  hpa:
    minReplicas: 1
    maxReplicas: 3
    metrics:
      - type: Resource
        resource:
          name: cpu
          target:
            type: Utilization
            averageUtilization: 80
kubectl apply -n vm -f vmagent.yaml
kubectl get hpa -n vm test

Remove the HPA configuration:

kubectl patch vmagent -n vm test \
  --type=json \
  -p='[{"op":"remove","path":"/spec/hpa"}]'

sleep 5
kubectl get hpa -n vm test

Evidence

The HPA still exists:

NAME   REFERENCE      TARGETS         MINPODS   MAXPODS
test   VMAgent/test   <unknown>/80%   1         3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.