Skip to content

Commit 7fa221a

Browse files
authored
Bump minimum AKS version to 1.33.7 #3708 (#3712)
1 parent 08a72b0 commit 7fa221a

13 files changed

Lines changed: 108 additions & 38 deletions

File tree

.github/copilot-instructions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ Updating the change log:
1616

1717
- After completing updates, update the change log in `docs/changelog.md` with a high-level one or two-line summary of the changes and the linked issue.
1818
- Change log entries are added as a new bullet point with the issue number in square brackets, under the Unreleased section.
19+
20+
Common maintenance tasks:
21+
22+
Periodically we need to run maintenance tasks to keep the repository up to date and ensure that all rules are compliant with the latest standards and practices. This includes:
23+
24+
- Updating the minimum Kubernetes version for AKS clusters, see instructions in `.github/prompts/aks-minimum-version-update.prompt.md`.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
AKS Minimum Version - Update Instructions
2+
3+
Purpose
4+
5+
A concise guide to update the repository's AKS minimum Kubernetes version (configuration, docs, tests) while preserving baselines.
6+
7+
Steps
8+
9+
1. Branch
10+
- Create a feature branch: `git checkout -b <your-user>/bump-aks-minimum-1.33.7`
11+
12+
2. Config
13+
- Edit `src/PSRule.Rules.Azure/rules/Config.Rule.yaml` and set:
14+
- `AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.33.7'`
15+
16+
3. Find & Update
17+
- Search the repo for the old version and the config key:
18+
- `git grep -n "1.32.7"`
19+
- `git grep -n "AZURE_AKS_CLUSTER_MINIMUM_VERSION"`
20+
- Update matching documentation, examples, and rule pages to `1.33.7` (notably `docs/examples/` and `docs/en/rules/`).
21+
22+
4. Tests & Fixtures
23+
- Update unit tests and fixtures under `tests/PSRule.Rules.Azure.Tests/`:
24+
- Replace `kubernetesVersion` / `orchestratorVersion` values in JSON/Bicep fixtures.
25+
- Update assertion strings to reference the new constraint `>=1.33.7`.
26+
- Prefer targeted small edits for large JSON fixtures to avoid large-patch failures.
27+
28+
5. Baselines (Important)
29+
- Do NOT change baseline files (e.g., `src/PSRule.Rules.Azure/rules/Baseline.Rule.yaml`).
30+
- Quick check: `git checkout -- src/PSRule.Rules.Azure/rules/Baseline.Rule.yaml` if you accidentally modify it.
31+
32+
6. Verify
33+
- Run unit tests locally (may take time):
34+
35+
PowerShell (recommended):
36+
37+
Invoke-Build Test -AssertStyle Client
38+
39+
Or run the VS Code task `test`.
40+
41+
- Optionally run analyzer: `Invoke-Build Analyze`.
42+
43+
7. Changelog & PR
44+
- Add a short changelog entry in `docs/changelog.md` under Unreleased mentioning the bump and that baselines were not updated.
45+
46+
Example:
47+
48+
```
49+
- Updated rules:
50+
- Azure Kubernetes Service:
51+
- Updated `Azure.AKS.Version` to use `1.33.7` as the minimum version by @BernieWhite.
52+
[#nnnn](https://github.com/Azure/PSRule.Rules.Azure/issues/nnnn)
53+
```
54+
55+
Notes & Tips
56+
57+
- If a single large JSON patch fails, split edits into smaller targeted apply_patch operations.
58+
- Run `git status` frequently to ensure baselines remain untouched.
59+
- Include a link in the PR description to the related issue or changelog entry.

docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers
3030

3131
## Unreleased
3232

33+
- Updated rules:
34+
- Azure Kubernetes Service:
35+
- Updated `Azure.AKS.Version` to use `1.33.7` as the minimum version by @BernieWhite.
36+
[#3708](https://github.com/Azure/PSRule.Rules.Azure/issues/3708)
37+
3338
## v1.47.0
3439

3540
What's changed since v1.46.0:

docs/concepts/about_PSRule_Azure_Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Default:
5050
```yaml
5151
# YAML: The default AZURE_AKS_CLUSTER_MINIMUM_VERSION configuration option
5252
configuration:
53-
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.32.7
53+
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.33.7
5454
```
5555
5656
Example:

docs/en/rules/Azure.AKS.NodeAutoUpgrade.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2024-10-01' = {
5757
}
5858
}
5959
properties: {
60-
kubernetesVersion: '1.32.7'
60+
kubernetesVersion: '1.33.7'
6161
enableRBAC: true
6262
dnsPrefix: dnsPrefix
6363
agentPoolProfiles: allPools
@@ -133,7 +133,7 @@ For example:
133133
}
134134
},
135135
"properties": {
136-
"kubernetesVersion": "1.32.7",
136+
"kubernetesVersion": "1.33.7",
137137
"enableRBAC": true,
138138
"dnsPrefix": "[parameters('dnsPrefix')]",
139139
"agentPoolProfiles": "[variables('allPools')]",

docs/en/rules/Azure.AKS.Version.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2024-10-01' = {
6666
}
6767
}
6868
properties: {
69-
kubernetesVersion: '1.32.7'
69+
kubernetesVersion: '1.33.7'
7070
enableRBAC: true
7171
dnsPrefix: dnsPrefix
7272
agentPoolProfiles: allPools
@@ -145,7 +145,7 @@ For example:
145145
}
146146
},
147147
"properties": {
148-
"kubernetesVersion": "1.32.7",
148+
"kubernetesVersion": "1.33.7",
149149
"enableRBAC": true,
150150
"dnsPrefix": "[parameters('dnsPrefix')]",
151151
"agentPoolProfiles": "[variables('allPools')]",
@@ -210,13 +210,13 @@ az aks update -n '<name>' -g '<resource_group>' --auto-upgrade-channel 'stable'
210210
```
211211

212212
```bash
213-
az aks upgrade -n '<name>' -g '<resource_group>' --kubernetes-version '1.32.7'
213+
az aks upgrade -n '<name>' -g '<resource_group>' --kubernetes-version '1.33.7'
214214
```
215215

216216
### Configure with Azure PowerShell
217217

218218
```powershell
219-
Set-AzAksCluster -Name '<name>' -ResourceGroupName '<resource_group>' -KubernetesVersion '1.32.7'
219+
Set-AzAksCluster -Name '<name>' -ResourceGroupName '<resource_group>' -KubernetesVersion '1.33.7'
220220
```
221221

222222
## NOTES

docs/examples/resources/aks.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ param systemPoolMin int
4646
param systemPoolMax int = 3
4747

4848
@description('The version of Kubernetes.')
49-
param kubernetesVersion string = '1.32.7'
49+
param kubernetesVersion string = '1.33.7'
5050

5151
@description('Maximum number of pods that can run on nodes in the system pool.')
5252
@minValue(30)

docs/examples/resources/aks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
"kubernetesVersion": {
7575
"type": "string",
76-
"defaultValue": "1.32.7",
76+
"defaultValue": "1.33.7",
7777
"metadata": {
7878
"description": "The version of Kubernetes."
7979
}

docs/setup/configuring-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Default:
207207
```yaml title="ps-rule.yaml"
208208
# YAML: The default AZURE_AKS_CLUSTER_MINIMUM_VERSION configuration option
209209
configuration:
210-
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.32.7
210+
AZURE_AKS_CLUSTER_MINIMUM_VERSION: 1.33.7
211211
```
212212

213213
Example:

src/PSRule.Rules.Azure/rules/Config.Rule.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
AZURE_BICEP_CHECK_TOOL: false
4141

4242
# Configures minimum AKS cluster version.
43-
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.32.7'
43+
AZURE_AKS_CLUSTER_MINIMUM_VERSION: '1.33.7'
4444

4545
# Configures the minimum allowed max pods setting per node pool.
4646
AZURE_AKS_POOL_MINIMUM_MAXPODS: 50

0 commit comments

Comments
 (0)