Skip to content
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

Allow writing 'null' for HardwareRAIDVolumes and SoftwareRAIDVolumes. #966

Merged
merged 1 commit into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apis/metal3.io/v1alpha1/baremetalhost_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ type RAIDConfig struct {
// The list of logical disks for hardware RAID, if rootDeviceHints isn't used, first volume is root volume.
// You can set the value of this field to `[]` to clear all the hardware RAID configurations.
// +optional
// +nullable
Copy link
Member

Choose a reason for hiding this comment

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

Should we include something in the docstring which describes that you can set the value to null, and what that means?

HardwareRAIDVolumes []HardwareRAIDVolume `json:"hardwareRAIDVolumes"`

// The list of logical disks for software RAID, if rootDeviceHints isn't used, first volume is root volume.
Expand All @@ -290,6 +291,7 @@ type RAIDConfig struct {
// Software RAID will always be deleted.
// +kubebuilder:validation:MaxItems=2
// +optional
// +nullable
SoftwareRAIDVolumes []SoftwareRAIDVolume `json:"softwareRAIDVolumes"`
}

Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/metal3.io_baremetalhosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ spec:
required:
- level
type: object
nullable: true
type: array
softwareRAIDVolumes:
description: The list of logical disks for software RAID, if rootDeviceHints
Expand Down Expand Up @@ -403,6 +404,7 @@ spec:
- level
type: object
maxItems: 2
nullable: true
type: array
type: object
rootDeviceHints:
Expand Down Expand Up @@ -903,6 +905,7 @@ spec:
required:
- level
type: object
nullable: true
type: array
softwareRAIDVolumes:
description: The list of logical disks for software RAID,
Expand Down Expand Up @@ -992,6 +995,7 @@ spec:
- level
type: object
maxItems: 2
nullable: true
type: array
type: object
rootDeviceHints:
Expand Down
4 changes: 4 additions & 0 deletions config/render/capm3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ spec:
required:
- level
type: object
nullable: true
type: array
softwareRAIDVolumes:
description: The list of logical disks for software RAID, if rootDeviceHints
Expand Down Expand Up @@ -401,6 +402,7 @@ spec:
- level
type: object
maxItems: 2
nullable: true
type: array
type: object
rootDeviceHints:
Expand Down Expand Up @@ -901,6 +903,7 @@ spec:
required:
- level
type: object
nullable: true
type: array
softwareRAIDVolumes:
description: The list of logical disks for software RAID,
Expand Down Expand Up @@ -990,6 +993,7 @@ spec:
- level
type: object
maxItems: 2
nullable: true
type: array
type: object
rootDeviceHints:
Expand Down