|
| 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. |
0 commit comments