Skip to content

feat(module): add annotations for kubevirt migration settings#2158

Merged
yaroslavborbat merged 1 commit into
mainfrom
feat/module/migrations-settings
Mar 25, 2026
Merged

feat(module): add annotations for kubevirt migration settings#2158
yaroslavborbat merged 1 commit into
mainfrom
feat/module/migrations-settings

Conversation

@yaroslavborbat
Copy link
Copy Markdown
Member

@yaroslavborbat yaroslavborbat commented Mar 25, 2026

Description

Replaced the standalone parallel-outbound-migrations-per-node hook with a unified migration-config hook that manages all KubeVirt migration parameters via ModuleConfig annotations.

New configurable parameters (via ModuleConfig annotations):

  • virtualization.deckhouse.io/bandwidth-per-migration (default: 640Mi)
  • virtualization.deckhouse.io/completion-timeout-per-gib (default: 800)
  • virtualization.deckhouse.io/parallel-outbound-migrations-per-node (default: 1)
  • virtualization.deckhouse.io/progress-timeout (default: 150)

Why do we need it, and what problem does it solve?

Previously only parallelOutboundMigrationsPerNode was configurable via a ModuleConfig annotation; the rest of the migration parameters (bandwidthPerMigration, completionTimeoutPerGiB, progressTimeout) were hardcoded in the Helm template. This made it impossible to tune migration performance without patching the module.

The single-parameter hook also duplicated the same pattern (watch ModuleConfig annotations → write to values) that would need to be repeated for every new parameter.

This change unifies all annotation-driven migration settings into one hook and makes the Helm template driven by values, giving operators a clean, documented way to adjust migration performance per cluster.

What is the expected result?

  1. Add an annotation to the ModuleConfig for the virtualization module, e.g.:
    kubectl annotate moduleconfig virtualization \
      virtualization.deckhouse.io/bandwidth-per-migration=256Mi \
      virtualization.deckhouse.io/parallel-outbound-migrations-per-node=2
  2. Verify the migration-config hook fires and updates the internal values.
  3. Verify the KubeVirt CR reflects the new migration settings after Helm re-applies.
  4. Remove the annotation and verify the defaults are restored.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: module
type: feature
summary: "Add annotations for configuring KubeVirt migration settings (bandwidth, timeouts, parallelism) via ModuleConfig."
impact_level: low

@yaroslavborbat yaroslavborbat added this to the v1.7.0 milestone Mar 25, 2026
@yaroslavborbat yaroslavborbat force-pushed the feat/module/migrations-settings branch 2 times, most recently from 4c72cb0 to a115ed2 Compare March 25, 2026 16:25
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
@yaroslavborbat yaroslavborbat merged commit 27f0a68 into main Mar 25, 2026
31 of 32 checks passed
@yaroslavborbat yaroslavborbat deleted the feat/module/migrations-settings branch March 25, 2026 18:16
Isteb4k pushed a commit that referenced this pull request Mar 30, 2026
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
(cherry picked from commit 27f0a68)
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.

2 participants