Skip to content

pvc-allow-volume-expansion annotation does not work on PVC's consumed by VMSingle & VLSingle #1747

@syphernl

Description

@syphernl

We use pvc-autoresizer to automatically increase PVC sizes. This causes .spec.storage.resources.requests.storage in the VictoriaMetrics CR to become out-of-sync with the actual deployed PVC size.
The operator then attempts to resize the PVC back to the configured size but fails.

Example log:

2026-01-26T10:03:56.622481829Z {"level":"info","ts":"2026-01-26T10:03:56Z","logger":"controller.VLSingle","msg":"cannot decrease PVC=vlsingle-victorialogs size from=38Gi to=10Gi, please check VolumeClaimTemplate configuration","vlsingle":"victorialogs","namespace":"victorialogs"}

Current Behavior

According to #867 and https://github.com/VictoriaMetrics/operator/blob/master/config/examples/vmcluster_storage_class_unexpandable.yaml the annotation:

operator.victoriametrics.com/pvc-allow-volume-expansion: "false"

can be set to prevent the operator from decreasing PVC size. The given example is for VMCluster.

I have applied this annotation to the PVC consumed by VMSingle and VLSingle but it appears this does not prevent the operator from attempting to resize.

Expected Behavior

  • Annotation operator.victoriametrics.com/pvc-allow-volume-expansion: "false" should also work for PVC's consumed by VMSingle and VLSingle objects.

Notes

  • Current behavior leads to unnecessary error logs and potential conflicts with external PVC management.
  • Likely this feature is not yet implemented for PVC's consumed by VMSingle and VLSingle.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions