Skip to content

Commit

Permalink
feat: Add osSKU parameter back (#3856)
Browse files Browse the repository at this point in the history
  • Loading branch information
PixelRobots authored Jan 13, 2025
1 parent c33b422 commit 1c6db4f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
10 changes: 5 additions & 5 deletions avm/res/container-service/managed-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.ContainerService/managedClusters` | [2024-03-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2024-03-02-preview/managedClusters) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2023-07-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-07-02-preview/managedClusters/agentPools) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2024-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2024-08-01/managedClusters/agentPools) |
| `Microsoft.ContainerService/managedClusters/maintenanceConfigurations` | [2023-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-10-01/managedClusters/maintenanceConfigurations) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.KubernetesConfiguration/extensions` | [2022-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2022-03-01/extensions) |
Expand Down Expand Up @@ -2835,7 +2835,7 @@ Properties of the primary agent pool.
| [`orchestratorVersion`](#parameter-primaryagentpoolprofilesorchestratorversion) | string | The Kubernetes version of the agent pool. |
| [`osDiskSizeGB`](#parameter-primaryagentpoolprofilesosdisksizegb) | int | The OS disk size in GB of the agent pool. |
| [`osDiskType`](#parameter-primaryagentpoolprofilesosdisktype) | string | The OS disk type of the agent pool. |
| [`osSku`](#parameter-primaryagentpoolprofilesossku) | string | The OS SKU of the agent pool. |
| [`osSKU`](#parameter-primaryagentpoolprofilesossku) | string | The OS SKU of the agent pool. |
| [`osType`](#parameter-primaryagentpoolprofilesostype) | string | The OS type of the agent pool. |
| [`podSubnetResourceId`](#parameter-primaryagentpoolprofilespodsubnetresourceid) | string | The pod subnet ID of the agent pool. |
| [`proximityPlacementGroupResourceId`](#parameter-primaryagentpoolprofilesproximityplacementgroupresourceid) | string | The proximity placement group resource ID of the agent pool. |
Expand Down Expand Up @@ -3028,7 +3028,7 @@ The OS disk type of the agent pool.
- Required: No
- Type: string

### Parameter: `primaryAgentPoolProfiles.osSku`
### Parameter: `primaryAgentPoolProfiles.osSKU`

The OS SKU of the agent pool.

Expand Down Expand Up @@ -3304,7 +3304,7 @@ Define one or more secondary/additional agent pools.
| [`orchestratorVersion`](#parameter-agentpoolsorchestratorversion) | string | The Kubernetes version of the agent pool. |
| [`osDiskSizeGB`](#parameter-agentpoolsosdisksizegb) | int | The OS disk size in GB of the agent pool. |
| [`osDiskType`](#parameter-agentpoolsosdisktype) | string | The OS disk type of the agent pool. |
| [`osSku`](#parameter-agentpoolsossku) | string | The OS SKU of the agent pool. |
| [`osSKU`](#parameter-agentpoolsossku) | string | The OS SKU of the agent pool. |
| [`osType`](#parameter-agentpoolsostype) | string | The OS type of the agent pool. |
| [`podSubnetResourceId`](#parameter-agentpoolspodsubnetresourceid) | string | The pod subnet ID of the agent pool. |
| [`proximityPlacementGroupResourceId`](#parameter-agentpoolsproximityplacementgroupresourceid) | string | The proximity placement group resource ID of the agent pool. |
Expand Down Expand Up @@ -3497,7 +3497,7 @@ The OS disk type of the agent pool.
- Required: No
- Type: string

### Parameter: `agentPools.osSku`
### Parameter: `agentPools.osSKU`

The OS SKU of the agent pool.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2023-07-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-07-02-preview/managedClusters/agentPools) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2024-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2024-08-01/managedClusters/agentPools) |

## Parameters

Expand Down Expand Up @@ -52,7 +52,7 @@ This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool
| [`orchestratorVersion`](#parameter-orchestratorversion) | string | As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). |
| [`osDiskSizeGB`](#parameter-osdisksizegb) | int | OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. |
| [`osDiskType`](#parameter-osdisktype) | string | The default is "Ephemeral" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to "Managed". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os). |
| [`osSku`](#parameter-ossku) | string | Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. |
| [`osSKU`](#parameter-ossku) | string | Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. |
| [`osType`](#parameter-ostype) | string | The operating system type. The default is Linux. |
| [`podSubnetResourceId`](#parameter-podsubnetresourceid) | string | Subnet resource ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. |
| [`proximityPlacementGroupResourceId`](#parameter-proximityplacementgroupresourceid) | string | The ID for the Proximity Placement Group. |
Expand Down Expand Up @@ -290,7 +290,7 @@ The default is "Ephemeral" if the VM supports it and has a cache disk larger tha
- MinValue: 0
- MaxValue: 1000

### Parameter: `osSku`
### Parameter: `osSKU`

Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ param osDiskType string?
'Windows2019'
'Windows2022'
])
param osSku string?
param osSKU string?

@description('Optional. The operating system type. The default is Linux.')
@allowed([
Expand Down Expand Up @@ -150,7 +150,7 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-p
name: managedClusterName
}

resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2023-07-02-preview' = {
resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2024-08-01' = {
name: name
parent: managedCluster
properties: {
Expand Down Expand Up @@ -178,7 +178,7 @@ resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2023-0
orchestratorVersion: orchestratorVersion
osDiskSizeGB: osDiskSizeGB
osDiskType: osDiskType
osSKU: osSku
osSKU: osSKU
osType: osType
podSubnetID: podSubnetResourceId
proximityPlacementGroupID: proximityPlacementGroupResourceId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "8195372149835761348"
"templateHash": "17631357088187843838"
},
"name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool.",
Expand Down Expand Up @@ -185,7 +185,7 @@
"description": "Optional. The default is \"Ephemeral\" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to \"Managed\". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os)."
}
},
"osSku": {
"osSKU": {
"type": "string",
"nullable": true,
"allowedValues": [
Expand Down Expand Up @@ -316,7 +316,7 @@
},
"agentPool": {
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"apiVersion": "2023-07-02-preview",
"apiVersion": "2024-08-01",
"name": "[format('{0}/{1}', parameters('managedClusterName'), parameters('name'))]",
"properties": {
"availabilityZones": "[map(coalesce(parameters('availabilityZones'), createArray()), lambda('zone', format('{0}', lambdaVariables('zone'))))]",
Expand All @@ -339,7 +339,7 @@
"orchestratorVersion": "[parameters('orchestratorVersion')]",
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
"osDiskType": "[parameters('osDiskType')]",
"osSKU": "[parameters('osSku')]",
"osSKU": "[parameters('osSKU')]",
"osType": "[parameters('osType')]",
"podSubnetID": "[parameters('podSubnetResourceId')]",
"proximityPlacementGroupID": "[parameters('proximityPlacementGroupResourceId')]",
Expand Down
5 changes: 3 additions & 2 deletions avm/res/container-service/managed-cluster/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-p
osDiskSizeGB: profile.?osDiskSizeGB
osDiskType: profile.?osDiskType
osType: profile.?osType ?? 'Linux'
osSKU: profile.?osSKU
#disable-next-line use-resource-id-functions // Not possible to reference as nested
podSubnetID: profile.?podSubnetResourceId
#disable-next-line use-resource-id-functions // Not possible to reference as nested
Expand Down Expand Up @@ -893,7 +894,7 @@ module managedCluster_agentPools 'agent-pool/main.bicep' = [
orchestratorVersion: agentPool.?orchestratorVersion ?? kubernetesVersion
osDiskSizeGB: agentPool.?osDiskSizeGB
osDiskType: agentPool.?osDiskType
osSku: agentPool.?osSku
osSKU: agentPool.?osSKU
osType: agentPool.?osType
podSubnetResourceId: agentPool.?podSubnetResourceId
proximityPlacementGroupResourceId: agentPool.?proximityPlacementGroupResourceId
Expand Down Expand Up @@ -1129,7 +1130,7 @@ type agentPoolType = {
osDiskType: string?

@description('Optional. The OS SKU of the agent pool.')
osSku: string?
osSKU: string?

@description('Optional. The OS type of the agent pool.')
osType: ('Linux' | 'Windows')?
Expand Down
Loading

0 comments on commit 1c6db4f

Please sign in to comment.