Skip to content

Commit

Permalink
remove disk type validation (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-angelo authored Mar 8, 2024
1 parent 8e6f154 commit 9c16c6a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/gcp/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,8 @@ import (
)

const (
// DiskTypeStandard is the standard disk type
DiskTypeStandard = "pd-standard"
// DiskTypeSSD is the SSD disk type
DiskTypeSSD = "pd-ssd"
// DiskTypeScratch is the SCRATCH disk type
DiskTypeScratch = "SCRATCH"
// DiskTypePDBalanced is the balanced disk type
DiskTypePDBalanced = "pd-balanced"

// DiskInterfaceNVME is the NVME disk interface
DiskInterfaceNVME = "NVME"
// DiskInterfaceSCSI is the SCSI disk interface
Expand Down Expand Up @@ -105,9 +98,6 @@ func validateGCPDisks(disks []*api.GCPDisk, fldPath *field.Path) []error {
if disk.SizeGb < 20 {
allErrs = append(allErrs, field.Invalid(idxPath.Child("sizeGb"), disk.SizeGb, "disk size must be at least 20 GB"))
}
if disk.Type != DiskTypeStandard && disk.Type != DiskTypeSSD && disk.Type != DiskTypeScratch && disk.Type != DiskTypePDBalanced {
allErrs = append(allErrs, field.NotSupported(idxPath.Child("type"), disk.Type, []string{DiskTypeStandard, DiskTypeSSD, DiskTypeScratch, DiskTypePDBalanced}))
}
if disk.Type == DiskTypeScratch && (disk.Interface != DiskInterfaceNVME && disk.Interface != DiskInterfaceSCSI) {
allErrs = append(allErrs, field.NotSupported(idxPath.Child("interface"), disk.Interface, []string{DiskInterfaceNVME, DiskInterfaceSCSI}))
}
Expand Down

0 comments on commit 9c16c6a

Please sign in to comment.