github.com/openshift/installer@v1.4.17/pkg/types/azure/defaults/machines.go (about)

     1  package defaults
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/openshift/installer/pkg/types"
     7  	"github.com/openshift/installer/pkg/types/azure"
     8  )
     9  
    10  // ControlPlaneInstanceType sets the defaults for control plane instances.
    11  // Minimum requirements are 4 CPU's, 16GiB of ram, and 120GiB storage.
    12  // D8s_v3 gives us 8 CPU's, 32GiB ram and 64GiB of temporary storage
    13  // This extra bump is done to prevent etcd from overloading
    14  // DS4_v2 gives us 8 CPUs, 28GiB ram, and 56GiB of temporary storage.
    15  func ControlPlaneInstanceType(cloud azure.CloudEnvironment, region string, arch types.Architecture) string {
    16  	instanceClass := getInstanceClass(region)
    17  	size := "D8s_v3"
    18  	if arch == types.ArchitectureARM64 {
    19  		size = "D8ps_v5"
    20  	}
    21  	if cloud == azure.StackCloud {
    22  		size = "DS4_v2"
    23  	}
    24  	return instanceType(instanceClass, size)
    25  }
    26  
    27  // ComputeInstanceType sets the defaults for compute instances.
    28  // Minimum requirements are 2 CPU's, 8GiB of ram, and 120GiB storage.
    29  // D4s v3 gives us 4 CPU's, 16GiB ram and 32GiB of temporary storage
    30  // DS3_v2 gives us 4 CPUs, 14GiB ram, and 28GiB of temporary storage.
    31  func ComputeInstanceType(cloud azure.CloudEnvironment, region string, arch types.Architecture) string {
    32  	instanceClass := getInstanceClass(region)
    33  	size := "D4s_v3"
    34  	if arch == types.ArchitectureARM64 {
    35  		size = "D4ps_v5"
    36  	}
    37  	if cloud == azure.StackCloud {
    38  		size = "DS3_v2"
    39  	}
    40  	return instanceType(instanceClass, size)
    41  }
    42  
    43  func instanceType(class, size string) string {
    44  	return fmt.Sprintf("%s_%s", class, size)
    45  }