-
Epic
-
Resolution: Unresolved
-
Critical
-
None
-
custom-pvc-disk-net-name
-
False
-
None
-
False
-
To Do
-
100% To Do, 0% In Progress, 0% Done
In the migration plan, a user should have the ability to provide a custom names for
- the PVC to be created for a disk
- the name of the disk inside the VM CR
- the name of the interface inside the VM CR
---------------
Draft -
Adding pvcNameTemplate field to the Plan CR and to each VM in the VM list of the plan.
PVCNameTemplate is a template for generating PVC names for VM disks.
The VM specific template will override the template set in the plan.
It follows Go template syntax and has access to the following variables:
- .vmName: name of the VM
- .planName: name of the migration plan
- .diskIndex: initial volume index of the disk
- .rootDiskIndex: index of the root disk
Examples:
"{{.vmName}}-disk-{{.diskIndex}}" "{{if eq .DiskIndex .RootDiskIndex}}root{{else}}data{{end}}-{{.DiskIndex}}"
In the plan YAML:
spec: ... pvcNameTemplate: "{{.vmName}}-disk-{{.diskIndex}}" vms: - name: some-vm pvcNameTemplate: "{{.vmName}}-disk-{{.diskIndex}}"