diff --git a/arm/Microsoft.ContainerService/managedClusters/deploy.bicep b/arm/Microsoft.ContainerService/managedClusters/deploy.bicep index 742b1751fc..9c446189a5 100644 --- a/arm/Microsoft.ContainerService/managedClusters/deploy.bicep +++ b/arm/Microsoft.ContainerService/managedClusters/deploy.bicep @@ -128,6 +128,12 @@ param agentPools array = [] @description('Optional. Specifies whether the httpApplicationRouting add-on is enabled or not.') param httpApplicationRoutingEnabled bool = false +@description('Optional. Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not.') +param ingressApplicationGatewayEnabled bool = false + +@description('Conditional. Required if `ingressApplicationGatewayEnabled` is set to `true`. Specifies the resource ID of connected application gateway.') +param appGatewayResourceId string = '' + @description('Optional. Specifies whether the aciConnectorLinux add-on is enabled or not.') param aciConnectorLinuxEnabled bool = false @@ -202,7 +208,7 @@ param autoScalerProfileMaxTotalUnreadyPercentage string = '45' @description('Optional. For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit ("s" for seconds, "m" for minutes, "h" for hours, etc).') param autoScalerProfileNewPodScaleUpDelay string = '0s' -@description('Optional. Specifies the ok total unready count for the auto-scaler of the AKS cluster.') +@description('Optional. Specifies the OK total unready count for the auto-scaler of the AKS cluster.') param autoScalerProfileOkTotalUnreadyCount string = '3' @allowed([ @@ -328,10 +334,10 @@ var diagnosticsMetrics = [for metric in diagnosticMetricsToEnable: { var identityType = systemAssignedIdentity ? 'SystemAssigned' : (!empty(userAssignedIdentities) ? 'UserAssigned' : 'None') -var identity = identityType != 'None' ? { +var identity = { type: identityType userAssignedIdentities: !empty(userAssignedIdentities) ? userAssignedIdentities : null -} : null +} var aksClusterLinuxProfile = { adminUsername: aksClusterAdminUsername @@ -363,10 +369,10 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-01-01' = { +resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-02-01' = { name: name location: location - tags: (empty(tags) ? null : tags) + tags: tags identity: identity sku: { name: 'Basic' @@ -382,6 +388,13 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-01-01' httpApplicationRouting: { enabled: httpApplicationRoutingEnabled } + ingressApplicationGateway: { + enabled: ingressApplicationGatewayEnabled && !empty(appGatewayResourceId) + config: { + applicationGatewayId: !empty(appGatewayResourceId) ? any(appGatewayResourceId) : null + effectiveApplicationGatewayId: !empty(appGatewayResourceId) ? any(appGatewayResourceId) : null + } + } omsagent: { enabled: omsAgentEnabled && !empty(monitoringWorkspaceId) config: { diff --git a/arm/Microsoft.ContainerService/managedClusters/readme.md b/arm/Microsoft.ContainerService/managedClusters/readme.md index fc234b694d..6c14dc146b 100644 --- a/arm/Microsoft.ContainerService/managedClusters/readme.md +++ b/arm/Microsoft.ContainerService/managedClusters/readme.md @@ -14,7 +14,7 @@ This module deploys Azure Kubernetes Cluster (AKS). | :-- | :-- | | `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | | `Microsoft.Authorization/roleAssignments` | [2021-04-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/roleAssignments) | -| `Microsoft.ContainerService/managedClusters` | [2022-01-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-01-01/managedClusters) | +| `Microsoft.ContainerService/managedClusters` | [2022-02-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-02-01/managedClusters) | | `Microsoft.ContainerService/managedClusters/agentPools` | [2021-08-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2021-08-01/managedClusters/agentPools) | | `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) | @@ -26,6 +26,11 @@ This module deploys Azure Kubernetes Cluster (AKS). | `name` | string | Specifies the name of the AKS cluster. | | `primaryAgentPoolProfile` | array | Properties of the primary agent pool. | +**Conditional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `appGatewayResourceId` | string | `''` | Required if `ingressApplicationGatewayEnabled` is set to `true`. Specifies the resource ID of connected application gateway. | + **Optional parameters** | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | @@ -60,7 +65,7 @@ This module deploys Azure Kubernetes Cluster (AKS). | `autoScalerProfileMaxNodeProvisionTime` | string | `'15m'` | | Specifies the maximum node provisioning time for the auto-scaler of the AKS cluster. Values must be an integer followed by an "m". No unit of time other than minutes (m) is supported. | | `autoScalerProfileMaxTotalUnreadyPercentage` | string | `'45'` | | Specifies the mximum total unready percentage for the auto-scaler of the AKS cluster. The maximum is 100 and the minimum is 0. | | `autoScalerProfileNewPodScaleUpDelay` | string | `'0s'` | | For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit ("s" for seconds, "m" for minutes, "h" for hours, etc). | -| `autoScalerProfileOkTotalUnreadyCount` | string | `'3'` | | Specifies the ok total unready count for the auto-scaler of the AKS cluster. | +| `autoScalerProfileOkTotalUnreadyCount` | string | `'3'` | | Specifies the OK total unready count for the auto-scaler of the AKS cluster. | | `autoScalerProfileScaleDownDelayAfterAdd` | string | `'10m'` | | Specifies the scale down delay after add of the auto-scaler of the AKS cluster. | | `autoScalerProfileScaleDownDelayAfterDelete` | string | `'20s'` | | Specifies the scale down delay after delete of the auto-scaler of the AKS cluster. | | `autoScalerProfileScaleDownDelayAfterFailure` | string | `'3m'` | | Specifies scale down delay after failure of the auto-scaler of the AKS cluster. | @@ -91,6 +96,7 @@ This module deploys Azure Kubernetes Cluster (AKS). | `enablePrivateClusterPublicFQDN` | bool | `False` | | Whether to create additional public FQDN for private cluster or not. | | `enableSecretRotation` | string | `'false'` | `[false, true]` | Specifies whether the KeyvaultSecretsProvider add-on uses secret rotation. | | `httpApplicationRoutingEnabled` | bool | `False` | | Specifies whether the httpApplicationRouting add-on is enabled or not. | +| `ingressApplicationGatewayEnabled` | bool | `False` | | Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not. | | `kubeDashboardEnabled` | bool | `False` | | Specifies whether the kubeDashboard add-on is enabled or not. | | `location` | string | `[resourceGroup().location]` | | Specifies the location of AKS cluster. It picks up Resource Group's location by default. | | `lock` | string | `'NotSpecified'` | `[CanNotDelete, NotSpecified, ReadOnly]` | Specify the type of lock. | diff --git a/arm/Microsoft.ContainerService/managedClusters/version.json b/arm/Microsoft.ContainerService/managedClusters/version.json index 56f8d9ca40..badc0a2285 100644 --- a/arm/Microsoft.ContainerService/managedClusters/version.json +++ b/arm/Microsoft.ContainerService/managedClusters/version.json @@ -1,4 +1,4 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.4" + "version": "0.5" }