Skip to content

Add documentation for VolumeNamePolicy and PrefixTargetName VolumeRestorePolicy#986

Open
lyarwood wants to merge 1 commit intokubevirt:mainfrom
lyarwood:volume-name-policy-docs
Open

Add documentation for VolumeNamePolicy and PrefixTargetName VolumeRestorePolicy#986
lyarwood wants to merge 1 commit intokubevirt:mainfrom
lyarwood:volume-name-policy-docs

Conversation

@lyarwood
Copy link
Copy Markdown
Member

@lyarwood lyarwood commented Apr 8, 2026

Summary

  • Document the new volumeNamePolicy field on VirtualMachineClone, covering RandomizeNames (default) and PrefixTargetName policies with a YAML example
  • Add PrefixTargetName as a third option under the existing volume restore policies section of the snapshot/restore docs
  • Update the GitOps section to mention PrefixTargetName as an alternative to InPlace for predictable volume naming

Related PRs

…torePolicy

Document the new VolumeNamePolicy field on VirtualMachineClone and the
PrefixTargetName policy for both VirtualMachineClone and
VirtualMachineRestore. PrefixTargetName generates predictable PVC names
using {targetVMName}-{volumeName}, providing a deterministic alternative
to RandomizeNames while avoiding collisions across targets.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Apr 8, 2026
@kubevirt-bot kubevirt-bot requested a review from akalenyu April 8, 2026 08:24
@kubevirt-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign alicefr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot requested a review from awels April 8, 2026 08:24
Copy link
Copy Markdown
Contributor

@akalenyu akalenyu left a comment

Choose a reason for hiding this comment

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

thanks!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2026

### Volume name policy

The `volumeNamePolicy` field controls how volumes are named during the clone operation. Under the hood, this is converted to a `volumeRestorePolicy` on the `VirtualMachineRestore` created by the clone controller.
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.

How this works under the hood is theoretically always subject to changes, though somewhat unlikely in this case. Just a thought

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants