Skip to content

Commit

Permalink
feat: Update AKS Automatic mode examples to indicate PREVIEW status (A…
Browse files Browse the repository at this point in the history
…zure#3920)

## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes Azure#123
Fixes Azure#456
Closes Azure#123
Closes Azure#456
-->
Add documentation to test files to indicate that the AKS Automatic mode
examples are in preview.

Reduce count in test files.

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.container-service.managed-cluster](https://github.com/JPEasier/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml/badge.svg?branch=users%2Fjpeasier%2FpreviewAksDoc)](https://github.com/JPEasier/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [x] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
JPEasier authored Dec 13, 2024
1 parent 14cd197 commit 1805c98
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 275 deletions.
273 changes: 80 additions & 193 deletions avm/res/container-service/managed-cluster/README.md

Large diffs are not rendered by default.

36 changes: 23 additions & 13 deletions avm/res/container-service/managed-cluster/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ param backendPoolType string = 'NodeIPConfiguration'
])
param outboundType string = 'loadBalancer'

@description('Optional. Name of a managed cluster SKU.')
@description('Optional. Name of a managed cluster SKU. AUTOMATIC CLUSTER SKU IS A PARAMETER USED FOR A PREVIEW FEATURE, MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE [PRODUCT DOCS](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-automatic-deploy?pivots=bicep#before-you-begin) FOR CLARIFICATION.')
@allowed([
'Base'
'Automatic'
Expand Down Expand Up @@ -113,8 +113,12 @@ param enableRBAC bool = true
@description('Optional. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled.')
param disableLocalAccounts bool = true

@description('Optional. Node provisioning settings that apply to the whole cluster.')
param nodeProvisioningProfile object?
@description('Optional. Node provisioning settings that apply to the whole cluster. AUTO MODE IS A PARAMETER USED FOR A PREVIEW FEATURE, MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE [PRODUCT DOCS](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-automatic-deploy?pivots=bicep#before-you-begin) FOR CLARIFICATION.')
@allowed([
'Auto'
'Manual'
])
param nodeProvisioningProfileMode string?

@description('Optional. Name of the resource group containing agent pool nodes.')
param nodeResourceGroup string = '${resourceGroup().name}_aks_${name}_nodes'
Expand Down Expand Up @@ -689,7 +693,11 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-p
disableLocalAccounts: disableLocalAccounts
nodeResourceGroup: nodeResourceGroup
nodeResourceGroupProfile: nodeResourceGroupProfile
nodeProvisioningProfile: nodeProvisioningProfile
nodeProvisioningProfile: !empty(nodeProvisioningProfileMode)
? {
mode: nodeProvisioningProfileMode
}
: null
enablePodSecurityPolicy: enablePodSecurityPolicy
workloadAutoScalerProfile: {
keda: {
Expand Down Expand Up @@ -720,15 +728,17 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-p
}
}
publicNetworkAccess: publicNetworkAccess
aadProfile: !empty(aadProfile) ? {
clientAppID: aadProfile.?aadProfileClientAppID
serverAppID: aadProfile.?aadProfileServerAppID
serverAppSecret: aadProfile.?aadProfileServerAppSecret
managed: aadProfile.?aadProfileManaged
enableAzureRBAC: aadProfile.?aadProfileEnableAzureRBAC
adminGroupObjectIDs: aadProfile.?aadProfileAdminGroupObjectIDs
tenantID: aadProfile.?aadProfileTenantId
} : null
aadProfile: !empty(aadProfile)
? {
clientAppID: aadProfile.?aadProfileClientAppID
serverAppID: aadProfile.?aadProfileServerAppID
serverAppSecret: aadProfile.?aadProfileServerAppSecret
managed: aadProfile.?aadProfileManaged
enableAzureRBAC: aadProfile.?aadProfileEnableAzureRBAC
adminGroupObjectIDs: aadProfile.?aadProfileAdminGroupObjectIDs
tenantID: aadProfile.?aadProfileTenantId
}
: null
autoScalerProfile: {
'balance-similar-node-groups': toLower(string(autoScalerProfileBalanceSimilarNodeGroups))
expander: autoScalerProfileExpander
Expand Down
16 changes: 10 additions & 6 deletions avm/res/container-service/managed-cluster/main.json
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": "4928183195543464139"
"templateHash": "15234959045281729347"
},
"name": "Azure Kubernetes Service (AKS) Managed Clusters",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.",
Expand Down Expand Up @@ -949,7 +949,7 @@
"Automatic"
],
"metadata": {
"description": "Optional. Name of a managed cluster SKU."
"description": "Optional. Name of a managed cluster SKU. AUTOMATIC CLUSTER SKU IS A PARAMETER USED FOR A PREVIEW FEATURE, MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE [PRODUCT DOCS](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-automatic-deploy?pivots=bicep#before-you-begin) FOR CLARIFICATION."
}
},
"skuTier": {
Expand Down Expand Up @@ -1013,11 +1013,15 @@
"description": "Optional. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled."
}
},
"nodeProvisioningProfile": {
"type": "object",
"nodeProvisioningProfileMode": {
"type": "string",
"nullable": true,
"allowedValues": [
"Auto",
"Manual"
],
"metadata": {
"description": "Optional. Node provisioning settings that apply to the whole cluster."
"description": "Optional. Node provisioning settings that apply to the whole cluster. AUTO MODE IS A PARAMETER USED FOR A PREVIEW FEATURE, MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE [PRODUCT DOCS](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-automatic-deploy?pivots=bicep#before-you-begin) FOR CLARIFICATION."
}
},
"nodeResourceGroup": {
Expand Down Expand Up @@ -1790,7 +1794,7 @@
"disableLocalAccounts": "[parameters('disableLocalAccounts')]",
"nodeResourceGroup": "[parameters('nodeResourceGroup')]",
"nodeResourceGroupProfile": "[parameters('nodeResourceGroupProfile')]",
"nodeProvisioningProfile": "[parameters('nodeProvisioningProfile')]",
"nodeProvisioningProfile": "[if(not(empty(parameters('nodeProvisioningProfileMode'))), createObject('mode', parameters('nodeProvisioningProfileMode')), null())]",
"enablePodSecurityPolicy": "[parameters('enablePodSecurityPolicy')]",
"workloadAutoScalerProfile": {
"keda": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
targetScope = 'subscription'

metadata name = 'Using only defaults and use AKS Automatic mode'
metadata description = 'This instance deploys the module with the set of automatic parameters.'
metadata name = 'Using only defaults and use AKS Automatic mode (PREVIEW)'
metadata description = '''
This instance deploys the module with the set of automatic parameters.'
Node autoprovisioning (NAP) for AKS is currently in PREVIEW.
Register the NodeAutoProvisioningPreview feature flag using the az feature register command.
MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE [PRODUCT DOCS](https://learn.microsoft.com/en-us/azure/aks/node-autoprovision?tabs=azure-cli#enable-node-autoprovisioning) FOR CLARIFICATION.
'''

// ========== //
// Parameters //
Expand Down Expand Up @@ -72,17 +79,15 @@ module testDeployment '../../../main.bicep' = [
managedIdentities: {
systemAssigned: true
}
nodeProvisioningProfile: {
mode: 'Auto'
}
nodeProvisioningProfileMode: 'Auto'
nodeResourceGroupProfile: {
restrictionLevel: 'ReadOnly'
}
outboundType: 'managedNATGateway'
primaryAgentPoolProfiles: [
{
name: 'systempool'
count: 3
count: 1
vmSize: 'Standard_DS4_v2'
mode: 'System'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module testDeployment '../../../main.bicep' = [
osDiskSizeGB: 0
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: nestedDependencies.outputs.subnetResourceIds[0]
}
]
Expand All @@ -121,7 +121,7 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: nestedDependencies.outputs.subnetResourceIds[1]
proximityPlacementGroupResourceId: nestedDependencies.outputs.proximityPlacementGroupResourceId
}
Expand All @@ -143,7 +143,7 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: nestedDependencies.outputs.subnetResourceIds[2]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module testDeployment '../../../main.bicep' = [
{
name: 'systempool'
count: 3
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
mode: 'System'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ module testDeployment '../../../main.bicep' = [
primaryAgentPoolProfiles: [
{
name: 'systempool'
count: 3
vmSize: 'Standard_DS2_v2'
count: 2
vmSize: 'Standard_DS4_v2'
mode: 'System'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module testDeployment '../../../main.bicep' = [
osDiskSizeGB: 0
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
}
]
agentPools: [
Expand All @@ -107,27 +107,7 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
{
availabilityZones: [
3
]
count: 2
enableAutoScaling: true
maxCount: 3
maxPods: 30
minCount: 1
minPods: 2
mode: 'User'
name: 'userpool2'
nodeLabels: {}
osDiskSizeGB: 128
osType: 'Linux'
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
}
]
networkPlugin: 'kubenet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module testDeployment '../../../main.bicep' = [
primaryAgentPoolProfiles: [
{
name: 'systempool'
count: 3
count: 1
vmSize: 'Standard_DS2_v2'
mode: 'System'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module testDeployment '../../../main.bicep' = [
osDiskSizeGB: 0
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: '${nestedDependencies.outputs.vNetResourceId}/subnets/defaultSubnet'
}
]
Expand All @@ -100,29 +100,9 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: '${nestedDependencies.outputs.vNetResourceId}/subnets/defaultSubnet'
}
{
availabilityZones: [
3
]
count: 2
enableAutoScaling: true
maxCount: 3
maxPods: 30
minCount: 1
minPods: 2
mode: 'User'
name: 'userpool2'
nodeLabels: {}
osDiskSizeGB: 128
osType: 'Linux'
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
]
networkPlugin: 'azure'
skuTier: 'Standard'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module testDeployment '../../../main.bicep' = [
availabilityZones: [
3
]
count: 3
count: 1
enableAutoScaling: true
maxCount: 3
maxPods: 50
Expand All @@ -89,7 +89,7 @@ module testDeployment '../../../main.bicep' = [
osDiskSizeGB: 0
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: '${nestedDependencies.outputs.vNetResourceId}/subnets/defaultSubnet'
}
]
Expand All @@ -98,7 +98,7 @@ module testDeployment '../../../main.bicep' = [
availabilityZones: [
3
]
count: 3
count: 2
enableAutoScaling: true
maxCount: 3
maxPods: 50
Expand All @@ -113,14 +113,14 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
vnetSubnetResourceId: '${nestedDependencies.outputs.vNetResourceId}/subnets/defaultSubnet'
}
{
availabilityZones: [
3
]
count: 3
count: 2
enableAutoScaling: true
maxCount: 3
maxPods: 50
Expand All @@ -135,7 +135,7 @@ module testDeployment '../../../main.bicep' = [
scaleSetEvictionPolicy: 'Delete'
scaleSetPriority: 'Regular'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
vmSize: 'Standard_DS4_v2'
}
]
autoUpgradeProfileUpgradeChannel: 'stable'
Expand Down

0 comments on commit 1805c98

Please sign in to comment.