Update azure Policy key under addonProfiles matching Azure Portal casing#8495
Update azure Policy key under addonProfiles matching Azure Portal casing#8495nirnaymsft wants to merge 16 commits into
Conversation
When user enable policy via Portal the key added to addonProfiles is azurePolicy
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@nirnaymsft, may I ask what's the motivation to update the value? cc @fseldow |
This is customer raised issue. The RCA showed that, Enabling Azure Policy via CLI and Portal is causing different behavior in name of azurepolicy under addonProfiles object. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 8495 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/lgtm |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
FumingZhang
left a comment
There was a problem hiding this comment.
lgtm
but I have a question about if the goal is to fix the case issue in command az aks enable-addons and az aks addon enable only, user could also enable the policy addon when creating the cluster, do you want to fix the issue in that command too?
|
Please fix conflicts |
| assert not addon["enabled"] | ||
|
|
||
| disable_cmd = ( | ||
| "aks aks --resource-group={resource_group} --name={name} " |
| assert not addon["enabled"] | ||
|
|
||
| update_cmd = ( | ||
| "aks aks --resource-group={resource_group} --name={name} " |

When user enable policy via Portal the key added to addonProfiles is azurePolicy. Matching name in CLI as well.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks enable-addons
az aks addon list
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.