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

Resolve DiskType Issues #10

Merged
merged 1 commit into from
Apr 8, 2024
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: 1 addition & 1 deletion cloud/scope/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (m *MachinePoolScope) InstanceAdditionalDiskSpec() []*compute.AttachedDisk
AutoDelete: true,
InitializeParams: &compute.AttachedDiskInitializeParams{
DiskSizeGb: ptr.Deref(disk.Size, 30),
DiskType: string(*disk.DeviceType),
DiskType: *disk.DeviceType,
},
}
if strings.HasSuffix(additionalDisk.InitializeParams.DiskType, string(infrav1.LocalSsdDiskType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
enum:
- pd-standard
- pd-ssd
- pd-balanced
- local-ssd
type: string
size:
description: Size is the size of the disk in GBs. Defaults to
Expand Down
3 changes: 2 additions & 1 deletion exp/api/v1beta1/gcpmachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ type AttachedDiskSpec struct {
// 2. "pd-ssd" - SSD persistent disk
// 3. "local-ssd" - Local SSD disk (https://cloud.google.com/compute/docs/disks/local-ssd).
// Default is "pd-standard".
// +kubebuilder:validation:Enum=pd-standard;pd-ssd;local-ssd
// +optional
DeviceType *DiskType `json:"deviceType,omitempty"`
DeviceType *string `json:"deviceType,omitempty"`
// Size is the size of the disk in GBs.
// Defaults to 30GB. For "local-ssd" size is always 375GB.
// +optional
Expand Down
2 changes: 1 addition & 1 deletion exp/api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading