-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update azure Policy key under addonProfiles matching Azure Portal casing #8495
base: main
Are you sure you want to change the base?
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 |
@@ -150,7 +150,7 @@ | |||
CONST_KUBE_DASHBOARD_ADDON_NAME = "kubeDashboard" | |||
|
|||
# azure policy | |||
CONST_AZURE_POLICY_ADDON_NAME = "azurepolicy" | |||
CONST_AZURE_POLICY_ADDON_NAME = "azurePolicy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can revert this change now.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
addon_key in mc.addon_profiles and | ||
mc.addon_profiles[addon_key].enabled | ||
) | ||
enabled = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some existing test cases that create the AKS cluster with policy addon enabled, maybe you can modify one of those case to validate the change?
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 azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)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.json
automatically.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
.