Skip to content

Expose all vm-operator volume parameters in VSphereMachine spec.volumes #4100

Description

@randomvariable

User Story

As a cluster operator, I want to configure all vm-operator VirtualMachineVolume parameters through CAPV's VSphereMachine.spec.volumes, so that I can control disk attachment behavior (controller type/bus/unit, disk mode, sharing mode, application type, removability, read-only) for additional data disks and let my bootstrapper know of them from advance.

Detailed Description

VSphereMachineVolume (api/supervisor v1beta1/v1beta2) currently exposes only name, capacity, and storageClass. When CAPV builds the vm-operator VirtualMachine spec (pkg/services/vmoperator/vmopmachine.go), it sets only Name + PersistentVolumeClaim.ClaimName (+ hardcoded ReadOnly: false) on each volume.

vm-operator (served as v1alpha5/v1alpha6; CAPV's conversion hub↔spokes already round-trips all fields) supports:

  • applicationType (OracleRAC, MicrosoftWSFC)
  • controllerType (IDE, NVME, SCSI, SATA)
  • controllerBusNumber
  • diskMode (Persistent, NonPersistent, IndependentPersistent, IndependentNonPersistent)
  • sharingMode (None, MultiWriter)
  • unitNumber
  • removable
  • readOnly

These should be exposed on VSphereMachineVolume and passed through to the vm-operator VM spec.

Additionally, addVolume currently dedups volumes by ClaimName and returns early, so changes to volume parameters in the spec are silently ignored on subsequent reconciles — this should become upsert semantics.

Anything else you would like to add:

/kind feature
/area api

Activity

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

Metadata

Metadata

Labels

area/apiarea/supervisorIssues or PRs related to the supervisor modekind/featureCategorizes issue or PR as related to a new feature.lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions