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
Bug 1836339: GCP: Enable disk type and size customization #3595
Bug 1836339: GCP: Enable disk type and size customization #3595
Conversation
/test e2e-gcp |
pkg/types/gcp/machinepools.go
Outdated
// OSDisk defines the storage for instance. | ||
// | ||
// +optional | ||
OSDisk `json:"OSDisk"` |
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.
OSDisk `json:"OSDisk"` | |
OSDisk `json:"osDisk"` |
@rna-afk also make sure https://github.com/openshift/installer/blob/master/docs/dev/explain.md#generating-the-documentation is used to generate the new explain |
Nice feature! Added them. |
/test images |
/test e2e-gcp |
pkg/types/gcp/machinepools.go
Outdated
// OSDisk defines the disk for machines on GCP. | ||
type OSDisk struct { | ||
// DiskType defines the type of disk. | ||
// The valid values are <`pd-standard`, `pd-ssd`> |
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.
no need to keep the list in <>
@@ -17,5 +19,42 @@ func ValidateMachinePool(platform *gcp.Platform, p *gcp.MachinePool, fldPath *fi | |||
} | |||
} | |||
|
|||
if p.OSDisk.DiskSizeGB < 0 { | |||
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "Storage DiskSizeGB must be positive")) |
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.
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "Storage DiskSizeGB must be positive")) | |
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "must be a positive value")) |
@rna-afk: This pull request references Bugzilla bug 1836339, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
c414a6b
to
ab7d7e2
Compare
/test e2e-gcp |
1 similar comment
/test e2e-gcp |
pkg/types/gcp/machinepools.go
Outdated
type OSDisk struct { | ||
// DiskType defines the type of disk. | ||
// The valid values are pd-standard and pd-ssd | ||
// For master nodes, the valid value is pd-ssd. |
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.
// For master nodes, the valid value is pd-ssd. | |
// For control plane nodes, the valid value is pd-ssd. |
pkg/types/validation/machinepools.go
Outdated
if platform != nil { | ||
allErrs = append(allErrs, gcpvalidation.ValidateDefaultDiskType(platform.GCP.DefaultMachinePlatform, f)...) | ||
} |
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.
i think https://github.com/openshift/installer/pull/3520/files#diff-8722408266807d908915d162b2a30ed9R23 is the better place to validate the platform's default machinepool.
b1e4e4d
to
bd00c26
Compare
}, | ||
}, | ||
}, | ||
valid: false, |
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.
shouldn't this be valid true?
/approve /test e2e-gcp |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Currently, the installer does not allow the users to customize the type and size of the disks for the workers and control plane. Added the option for the user to specify the type and the size of the disks for both machines in GCP. The user can specify two types of disks, pd-standard and pd-ssd disks which are the options that GCP/Terraform provides. pd-standard is not recommended for control planes and will not be allowed as a value in the DefaultMachinePlatform and the master compute section.
/test e2e-gcp |
@rna-afk: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
@rna-afk: All pull requests linked via external trackers have merged: openshift/installer#3595. Bugzilla bug 1836339 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently, the installer does not allow the users to customize the
type and size of the disks for the workers and control plane.
Added the option for the user to specify the type and the size of
the disks for both machines in GCP.
The user can specify two types of disks, pd-standard and pd-ssd disks
which are the options that GCP/Terraform provides. pd-standard is not
recommended for control planes and will not be allowed as a value in
the DefaultMachinePlatform and the master compute section.