Skip to content

Commit

Permalink
Updated Azure.AKS.Version to use 1.29.7 Azure#3042 (Azure#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite authored Sep 16, 2024
1 parent f2a6ed5 commit 6c59297
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 41 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers
[#432](https://github.com/Azure/PSRule.Rules.Azure/issues/432)
- Verify that availability set members are in a backend pool by @BenjaminEngeset.
[#67](https://github.com/Azure/PSRule.Rules.Azure/issues/67)
- Updated rules:
- Azure Kubernetes Service:
- Updated `Azure.AKS.Version` to use `1.29.7` as the minimum version by @BernieWhite.
[#3042](https://github.com/Azure/PSRule.Rules.Azure/issues/3042)
- General improvements:
- **Important change:** Replaced the `Azure_AKSNodeMinimumMaxPods` option with `AZURE_AKS_POOL_MINIMUM_MAXPODS` by @BernieWhite.
[#941](https://github.com/Azure/PSRule.Rules.Azure/issues/941)
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/about_PSRule_Azure_Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Default:
```yaml
# YAML: The default AZURE_AKS_CLUSTER_MINIMUM_VERSION configuration option
configuration:
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.20.5
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.29.7
```
Example:
Expand Down
4 changes: 2 additions & 2 deletions docs/en/rules/Azure.AKS.NodeAutoUpgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ For example:
}
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"enableRBAC": true,
"dnsPrefix": "[parameters('dnsPrefix')]",
"agentPoolProfiles": "[variables('allPools')]",
Expand Down Expand Up @@ -137,7 +137,7 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2023-07-01' = {
}
}
properties: {
kubernetesVersion: '1.28.9'
kubernetesVersion: '1.29.7'
enableRBAC: true
dnsPrefix: dnsPrefix
agentPoolProfiles: allPools
Expand Down
8 changes: 4 additions & 4 deletions docs/en/rules/Azure.AKS.Version.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ For example:
}
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"enableRBAC": true,
"dnsPrefix": "[parameters('dnsPrefix')]",
"agentPoolProfiles": "[variables('allPools')]",
Expand Down Expand Up @@ -145,7 +145,7 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2023-07-01' = {
}
}
properties: {
kubernetesVersion: '1.28.9'
kubernetesVersion: '1.29.7'
enableRBAC: true
dnsPrefix: dnsPrefix
agentPoolProfiles: allPools
Expand Down Expand Up @@ -207,13 +207,13 @@ az aks update -n '<name>' -g '<resource_group>' --auto-upgrade-channel 'stable'
```

```bash
az aks upgrade -n '<name>' -g '<resource_group>' --kubernetes-version '1.28.9'
az aks upgrade -n '<name>' -g '<resource_group>' --kubernetes-version '1.29.7'
```

### Configure with Azure PowerShell

```powershell
Set-AzAksCluster -Name '<name>' -ResourceGroupName '<resource_group>' -KubernetesVersion '1.28.9'
Set-AzAksCluster -Name '<name>' -ResourceGroupName '<resource_group>' -KubernetesVersion '1.29.7'
```

## NOTES
Expand Down
2 changes: 1 addition & 1 deletion docs/examples-aks.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ param systemPoolMin int
param systemPoolMax int = 3

@description('The version of Kubernetes.')
param kubernetesVersion string = '1.28.9'
param kubernetesVersion string = '1.29.7'

@description('Maximum number of pods that can run on nodes in the system pool.')
@minValue(30)
Expand Down
6 changes: 3 additions & 3 deletions docs/examples-aks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "5111879364998616708"
"version": "0.29.47.4906",
"templateHash": "16153598617723280180"
}
},
"parameters": {
Expand Down Expand Up @@ -73,7 +73,7 @@
},
"kubernetesVersion": {
"type": "string",
"defaultValue": "1.28.9",
"defaultValue": "1.29.7",
"metadata": {
"description": "The version of Kubernetes."
}
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/configuring-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Default:
```yaml title="ps-rule.yaml"
# YAML: The default AZURE_AKS_CLUSTER_MINIMUM_VERSION configuration option
configuration:
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.28.9
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.29.7
```
Example:
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Use comments to add context.
AZURE_BICEP_MINIMUM_VERSION: '0.28.1'

# Configure the minimum AKS cluster version.
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.28.9'
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.29.7'

rule:
# Enable custom rules that don't exist in the baseline
Expand Down
2 changes: 1 addition & 1 deletion src/PSRule.Rules.Azure/rules/Config.Rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
AZURE_BICEP_CHECK_TOOL: false

# Configures minimum AKS cluster version.
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.28.9'
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.29.7'

# Configures the minimum allowed max pods setting per node pool.
AZURE_AKS_POOL_MINIMUM_MAXPODS: 50
Expand Down
2 changes: 1 addition & 1 deletion tests/PSRule.Rules.Azure.Tests/Azure.AKS.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Describe 'Azure.AKS' -Tag AKS {
$ruleResult.TargetName | Should -BeIn 'cluster-B';

$ruleResult[0].Reason | Should -Not -BeNullOrEmpty;
$ruleResult[0].Reason | Should -BeExactly "Path Properties.kubernetesVersion: The version '1.13.8' does not match the constraint '>=1.28.9'.";
$ruleResult[0].Reason | Should -BeExactly "Path Properties.kubernetesVersion: The version '1.13.8' does not match the constraint '>=1.29.7'.";

# Pass
$ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' });
Expand Down
12 changes: 6 additions & 6 deletions tests/PSRule.Rules.Azure.Tests/Resources.AKS.Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "[concat('dns-', parameters('clusterName'))]",
"agentPoolProfiles": [
{
Expand Down Expand Up @@ -210,7 +210,7 @@
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "[concat('dns-', parameters('clusterName'))]",
"agentPoolProfiles": [
{
Expand Down Expand Up @@ -395,7 +395,7 @@
"vnetSubnetID": "[concat(parameters('vnetId'), '/subnets/subnet-03')]",
"maxPods": 50,
"type": "VirtualMachineScaleSets",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false
}
Expand Down Expand Up @@ -427,7 +427,7 @@
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "[concat('dns-', parameters('clusterName'))]",
"agentPoolProfiles": [
{
Expand Down Expand Up @@ -628,7 +628,7 @@
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "[concat('dns-', parameters('clusterName5'))]",
"agentPoolProfiles": [
{
Expand Down Expand Up @@ -831,7 +831,7 @@
"type": "SystemAssigned"
},
"properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "[concat('dns-', parameters('clusterName6'))]",
"agentPoolProfiles": [
{
Expand Down
40 changes: 20 additions & 20 deletions tests/PSRule.Rules.Azure.Tests/Resources.AKS.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ResourceName": "cluster-A",
"Name": "cluster-A",
"Properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-A",
"fqdn": "cluster-A-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -18,7 +18,7 @@
"vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet-A/subnets/subnet-A",
"maxPods": 30,
"type": "AvailabilitySet",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false,
"availabilityZones": null
Expand Down Expand Up @@ -204,7 +204,7 @@
"ParentResource": null,
"Properties": {
"provisioningState": "Succeeded",
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-C",
"fqdn": "cluster-C-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -218,7 +218,7 @@
"maxPods": 50,
"type": "VirtualMachineScaleSets",
"provisioningState": "Succeeded",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false
}
Expand Down Expand Up @@ -428,7 +428,7 @@
"Plan": null,
"Properties": {
"provisioningState": "Succeeded",
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-D",
"fqdn": "cluster-D-nnnnnnnn.hcp.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -441,7 +441,7 @@
"maxPods": 50,
"type": "VirtualMachineScaleSets",
"provisioningState": "Succeeded",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"nodeLabels": {},
"mode": "System",
"osType": "Linux",
Expand Down Expand Up @@ -655,7 +655,7 @@
"powerState": {
"code": "Running"
},
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"nodeLabels": {},
"mode": "System",
"osType": "Linux",
Expand Down Expand Up @@ -725,7 +725,7 @@
"powerState": {
"code": "Running"
},
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-F",
"fqdn": "cluster-F-00000000.hcp.region.azmk8s.io",
"azurePortalFQDN": "cluster-F-00000000.portal.hcp.region.azmk8s.io",
Expand All @@ -746,7 +746,7 @@
"powerState": {
"code": "Running"
},
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"nodeLabels": {},
"mode": "System",
"osType": "Linux",
Expand Down Expand Up @@ -1018,7 +1018,7 @@
"ResourceName": "cluster-G",
"Name": "cluster-G",
"Properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-G",
"fqdn": "cluster-G-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -1030,7 +1030,7 @@
"vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet-A/subnets/subnet-A",
"maxPods": 30,
"type": "VirtualMachineScaleSets",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false,
"availabilityZones": null
Expand Down Expand Up @@ -1193,7 +1193,7 @@
"ResourceName": "cluster-H",
"Name": "cluster-H",
"Properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-H",
"fqdn": "cluster-H-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -1205,7 +1205,7 @@
"vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet-A/subnets/subnet-A",
"maxPods": 30,
"type": "VirtualMachineScaleSets",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false,
"availabilityZones": []
Expand Down Expand Up @@ -1372,7 +1372,7 @@
"ResourceName": "cluster-I",
"Name": "cluster-I",
"Properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-I",
"fqdn": "cluster-I-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -1390,7 +1390,7 @@
"powerState": {
"code": "Running"
},
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"mode": "System",
"osType": "Linux",
"osSKU": "Ubuntu",
Expand All @@ -1413,7 +1413,7 @@
"powerState": {
"code": "Running"
},
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"mode": "User",
"osType": "Linux",
"osSKU": "Ubuntu",
Expand Down Expand Up @@ -1582,7 +1582,7 @@
"ResourceName": "cluster-J",
"Name": "cluster-J",
"Properties": {
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-J",
"fqdn": "cluster-J-00000000.nnn.region.azmk8s.io",
"agentPoolProfiles": [
Expand All @@ -1594,7 +1594,7 @@
"vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet-A/subnets/subnet-A",
"maxPods": 30,
"type": "VirtualMachineScaleSets",
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"osType": "Linux",
"enableAutoScaling": false,
"availabilityZones": null
Expand Down Expand Up @@ -1767,7 +1767,7 @@
"powerState": {
"code": "Running"
},
"kubernetesVersion": "1.28.9",
"kubernetesVersion": "1.29.7",
"dnsPrefix": "cluster-K",
"fqdn": "cluster-K-00000000.hcp.eastus.azmk8s.io",
"azurePortalFQDN": "cluster-K-00000000.portal.hcp.eastus.azmk8s.io",
Expand All @@ -1788,7 +1788,7 @@
"powerState": {
"code": "Running"
},
"orchestratorVersion": "1.28.9",
"orchestratorVersion": "1.29.7",
"mode": "System",
"osType": "Linux",
"osSKU": "Ubuntu",
Expand Down

0 comments on commit 6c59297

Please sign in to comment.