Skip to content

operator: add VPA support to vmalert, vmalertmanager, vmagent, vlagent, vlsingle, vtsingle, vmsingle#2285

Open
AndrewChubatiuk wants to merge 1 commit into
masterfrom
vpa-support
Open

operator: add VPA support to vmalert, vmalertmanager, vmagent, vlagent, vlsingle, vtsingle, vmsingle#2285
AndrewChubatiuk wants to merge 1 commit into
masterfrom
vpa-support

Conversation

@AndrewChubatiuk

@AndrewChubatiuk AndrewChubatiuk commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

fixes #2252


Summary by cubic

Add VerticalPodAutoscaler support via a new spec.vpa field for vmagent, vmalert, vmalertmanager, vmsingle, vlsingle, vtsingle, vlagent, and vmanomaly. The operator now creates, updates, and deletes VPAs for these resources; enable with VM_VPA_API_ENABLED=true.

  • New Features

    • New spec.vpa with validation across the listed CRDs; CRD schemas, docs, and deepcopy updated.
    • Operator reconciles VPAs per resource:
      • vmagent: targets the Deployment; invalid with daemonSetMode; with sharding, a VPA per shard.
      • vlagent: target follows workload — StatefulSet by default, DaemonSet when k8sCollector.enabled is true.
      • vmalert, vmsingle, vlsingle, vtsingle: target the Deployment.
      • vmalertmanager, vmanomaly: target the StatefulSet.
    • Removing spec.vpa deletes the corresponding VPA.
  • Migration

    • Set VM_VPA_API_ENABLED=true on the operator; reconciliation errors if spec.vpa is set without it.
    • Add spec.vpa in your CRs to enable; remove it to disable.
    • For vmagent, do not set spec.vpa when daemonSetMode: true; with sharding, VPAs are created per shard automatically.

Written for commit 78fe37c. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 20 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread internal/controller/operator/factory/vmagent/vmagent.go Outdated
Comment thread internal/controller/operator/factory/vmanomaly/statefulset.go Outdated
Comment thread api/operator/v1/vlagent_types.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 20 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread api/operator/v1beta1/vmextra_types.go
@AndrewChubatiuk AndrewChubatiuk force-pushed the vpa-support branch 3 times, most recently from 1e0fc93 to 90e635c Compare June 15, 2026 12:26
@vrutkovs vrutkovs enabled auto-merge (squash) June 15, 2026 12:27
@vrutkovs vrutkovs disabled auto-merge June 15, 2026 12:28
Comment thread api/operator/v1/vlagent_types.go Outdated
Comment thread docs/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add VPA support for vmagent, vmalert, vmalertmanager and vmsingle

2 participants