Skip to content
Merged
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
20 changes: 15 additions & 5 deletions pkg/asset/machines/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ const (

// workerUserDataFileName is the filename used for the worker user-data secret.
workerUserDataFileName = "99_openshift-cluster-api_worker-user-data-secret.yaml"

// decimalRootVolumeSize is the size in GB we use for some platforms.
// See below.
decimalRootVolumeSize = 120

// powerOfTwoRootVolumeSize is the size in GB we use for other platforms.
// The reasons for the specific choices between these two may boil down
// to which section of code the person adding a platform was copy-pasting from.
// https://github.com/openshift/openshift-docs/blob/main/modules/installation-requirements-user-infra.adoc#minimum-resource-requirements
powerOfTwoRootVolumeSize = 128
)

var (
Expand All @@ -83,7 +93,7 @@ func defaultAWSMachinePoolPlatform() awstypes.MachinePool {
return awstypes.MachinePool{
EC2RootVolume: awstypes.EC2RootVolume{
Type: "gp2",
Size: 120,
Size: decimalRootVolumeSize,
},
}
}
Expand All @@ -103,7 +113,7 @@ func defaultLibvirtMachinePoolPlatform() libvirttypes.MachinePool {
func defaultAzureMachinePoolPlatform() azuretypes.MachinePool {
return azuretypes.MachinePool{
OSDisk: azuretypes.OSDisk{
DiskSizeGB: 128,
DiskSizeGB: powerOfTwoRootVolumeSize,
DiskType: azuretypes.DefaultDiskType,
},
}
Expand All @@ -113,7 +123,7 @@ func defaultGCPMachinePoolPlatform() gcptypes.MachinePool {
return gcptypes.MachinePool{
InstanceType: "n1-standard-4",
OSDisk: gcptypes.OSDisk{
DiskSizeGB: 128,
DiskSizeGB: powerOfTwoRootVolumeSize,
DiskType: "pd-ssd",
},
}
Expand Down Expand Up @@ -143,7 +153,7 @@ func defaultOvirtMachinePoolPlatform() ovirttypes.MachinePool {
},
MemoryMB: 16348,
OSDisk: &ovirttypes.Disk{
SizeGB: 120,
SizeGB: decimalRootVolumeSize,
},
VMType: ovirttypes.VMTypeServer,
AutoPinningPolicy: ovirttypes.AutoPinningNone,
Expand All @@ -156,7 +166,7 @@ func defaultVSphereMachinePoolPlatform() vspheretypes.MachinePool {
NumCoresPerSocket: 2,
MemoryMiB: 8192,
OSDisk: vspheretypes.OSDisk{
DiskSizeGB: 120,
DiskSizeGB: decimalRootVolumeSize,
},
}
}
Expand Down