diff --git a/bicep/aksagentpool.bicep b/bicep/aksagentpool.bicep index 6fba74382..86e2180b1 100644 --- a/bicep/aksagentpool.bicep +++ b/bicep/aksagentpool.bicep @@ -51,6 +51,9 @@ param autoTaintWindows bool = false var taints = autoTaintWindows ? union(nodeTaints, ['sku=Windows:NoSchedule']) : nodeTaints +// Default OS Disk Size in GB for Linux is 30, for Windows is 100 +var defaultOsDiskSizeGB = osType == 'Linux' ? 30 : 100 + resource aks 'Microsoft.ContainerService/managedClusters@2021-10-01' existing = { name: AksName } @@ -68,7 +71,7 @@ resource userNodepool 'Microsoft.ContainerService/managedClusters/agentPools@202 availabilityZones: !empty(availabilityZones) ? availabilityZones : null osDiskType: osDiskType osSKU: osSKU - osDiskSizeGB: osDiskSizeGB + osDiskSizeGB: osDiskSizeGB == 0 ? defaultOsDiskSizeGB : osDiskSizeGB osType: osType maxPods: maxPods type: 'VirtualMachineScaleSets' diff --git a/bicep/main.bicep b/bicep/main.bicep index b7b8af46c..dc28d4a7f 100644 --- a/bicep/main.bicep +++ b/bicep/main.bicep @@ -1375,6 +1375,9 @@ param osSKU string = 'Ubuntu' var poolName = osType == 'Linux' ? nodePoolName : take(nodePoolName, 6) +// Default OS Disk Size in GB for Linux is 30, for Windows is 100 +var defaultOsDiskSizeGB = osType == 'Linux' ? 30 : 100 + module userNodePool '../bicep/aksagentpool.bicep' = if (!JustUseSystemPool){ name: take('${deployment().name}-userNodePool',64) params: { @@ -1390,7 +1393,7 @@ module userNodePool '../bicep/aksagentpool.bicep' = if (!JustUseSystemPool){ osType: osType osSKU: osSKU enableNodePublicIP: enableNodePublicIP - osDiskSizeGB: osDiskSizeGB + osDiskSizeGB: osDiskSizeGB == 0 ? defaultOsDiskSizeGB : osDiskSizeGB availabilityZones: availabilityZones } } diff --git a/helper/src/config.json b/helper/src/config.json index 3c92aceda..6ba9aba49 100644 --- a/helper/src/config.json +++ b/helper/src/config.json @@ -50,7 +50,7 @@ "maxCount": 20, "computeType": "gp", "vmSize": "Standard_DS3_v2", - "osDiskSizeGB": 0, + "osDiskSizeGB": 30, "osDiskType": "Ephemeral", "enable_aad": true, "AksDisableLocalAccounts": false,