-
Notifications
You must be signed in to change notification settings - Fork 1.5k
{AKS} az aks update: Add --network-policy to support updating the mode of a network policy
#6809
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
{AKS} az aks update: Add --network-policy to support updating the mode of a network policy
#6809
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks update | cmd aks update added parameter network_policy |
|
Hi @robogatikov, |
|
AKS |
b0a162d to
6726444
Compare
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.
in addition to the live test you added, should we have a unit test in test_managed_cluster_decorator.py? Maybe add something to test_update_network_plugin_settings?
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.
Added a test case to update network-policy from empty string to "azure"
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.
Python implicitly converts "" to False, if user specifies --network-policy "", the code will not update the property value to "", is this expected?
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.
do we need to update the test fixtures after running the live test? I would have expected this to change the PUT MC request, but don't see any changes in recordings/test_aks_migrate_cluster_to_cilium_dataplane.yaml
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.
I am not sure about test fixtures, probably @FumingZhang or @zhoxing-ms can help clarify
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.
Queued live test to validate the change. If test passed, the recording file would be published as pipeline artifact, could download and commit it.
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.
The test failed due to
E azure.core.exceptions.HttpResponseError: (PropertyChangeNotAllowed) Changing property 'networkProfile.networkPolicy' is not allowed.
E Code: PropertyChangeNotAllowed
E Message: Changing property 'networkProfile.networkPolicy' is not allowed.
E Target: networkProfile.networkPolicy
To test the feature, need a feature flag or specific sub?
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.
Thanks @FumingZhang. The test failed because the change that would allow updating network policy to "cilium" has not been rolled out to eastus yet. We should wait a few days for it to reach eastus I suppose unless there is some other option.
6726444 to
14cb218
Compare
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.
Queued live test to validate the change. If test passed, the recording file would be published as pipeline artifact, could download and commit it.
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.
Python implicitly converts "" to False, if user specifies --network-policy "", the code will not update the property value to "", is this expected?
|
Requeued live test |
FumingZhang
left a comment
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
live test passed
--network-policy to az aks updateaz aks update: Add --network-policy to support updating the mode of a network policy
|
Please take a look at this comment #6809 (comment) |
Thanks, @zhoxing-ms , added description to HISTORY.rst and bumped extension version to 1.5.161 |
|
Please fix conflicting files |
Thanks @yonzhan , forgot to sync my fork. Resolved merge conflicts |
|
[Release] Update index.json for extension [ aks-preview ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=99574&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks update --network-policy=noneaz aks update --network-policy=azureaz aks update --network-policy=ciliumGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
live test recording file: test_aks_migrate_cluster_to_cilium_dataplane.txt
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.