-
Notifications
You must be signed in to change notification settings - Fork 58
Additional volumes #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Additional volumes #561
Changes from 2 commits
313e33a
c9dc3da
35eeec3
f31cebc
fcc05e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -140,27 +140,37 @@ type Storage struct { | |||||||||||||
| // to change the size of the boot volume. | ||||||||||||||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" | ||||||||||||||
| // +optional | ||||||||||||||
| BootVolume *DiskSize `json:"bootVolume,omitempty"` | ||||||||||||||
| BootVolume *DiskSpec `json:"bootVolume,omitempty"` | ||||||||||||||
|
|
||||||||||||||
| // TODO Intended to add handling for additional volumes, | ||||||||||||||
| // which will be added to the node. | ||||||||||||||
| // e.g. AdditionalVolumes []DiskSize. | ||||||||||||||
| // AdditionalVolumes defines additional volumes to be added to the virtual machine. | ||||||||||||||
| // +optional | ||||||||||||||
| AdditionalVolumes []DiskSpec `json:"additionalVolumes,omitempty"` | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| // DiskSize is contains values for the disk device and size. | ||||||||||||||
| type DiskSize struct { | ||||||||||||||
| // DiskSpec is contains values for the disk device and size. | ||||||||||||||
| type DiskSpec struct { | ||||||||||||||
| // Disk is the name of the disk device, that should be resized. | ||||||||||||||
| // Example values are: ide[0-3], scsi[0-30], sata[0-5]. | ||||||||||||||
| Disk string `json:"disk"` | ||||||||||||||
|
|
||||||||||||||
| // Size defines the size in gigabyte. | ||||||||||||||
| // | ||||||||||||||
| // As Proxmox does not support shrinking, the size | ||||||||||||||
| // must be bigger than the already configured size in the | ||||||||||||||
| // template. | ||||||||||||||
| // | ||||||||||||||
| // +kubebuilder:validation:Minimum=5 | ||||||||||||||
| SizeGB int32 `json:"sizeGb"` | ||||||||||||||
| // Storage is an optional per-volume Proxmox storage name (e.g., "local-lvm", "nfs-data"). | ||||||||||||||
| // If omitted, falls back to the machine's .spec.storage. | ||||||||||||||
| // +optional | ||||||||||||||
| Storage *string `json:"storage,omitempty"` | ||||||||||||||
| // Format is optional: | ||||||||||||||
holmesb marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| Format *TargetFileStorageFormat `json:"format,omitempty"` | ||||||||||||||
holmesb marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| // Discard enables TRIM/UNMAP support for this virtual disk. | ||||||||||||||
| // Safe on IDE/SATA/SCSI/VirtIO; maps to Proxmox "discard=on". | ||||||||||||||
| // If omitted or false, the flag is not set. | ||||||||||||||
| // +optional | ||||||||||||||
| Discard *bool `json:"discard,omitempty"` | ||||||||||||||
| Iothread *bool `json:"iothread,omitempty"` | ||||||||||||||
holmesb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| SSD *bool `json:"ssd,omitempty"` | ||||||||||||||
|
||||||||||||||
| SSD *bool `json:"ssd,omitempty"` | |
| // SSDEmulation enables SSD emulation feature | |
| // SSD emulation sets a drive to be presented to the guest as a solid-state drive rather than a rotational hard disk | |
| // There is no requirement that the underlying storage actually be backed by SSDs; this feature can be used with physical media of any type | |
| // SSD emulation is not supported on VirtIO Block drives. | |
| SSDEmulation *bool `json:"ssdEmulation,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice comment, but Proxmox field is ssd, not ssdEmulation. Do you agree CRDs and CAPMOX settings should align with PVE terminology? Otherwise we'll have to explain in documentation that "ssdEmulation" = the PVE "ssd" setting. Def "emulation" should be used in documentation tho, and I've included your code comment.
Uh oh!
There was an error while loading. Please reload this page.