{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.
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.
Added a test case to update network-policy from empty string to "azure"
There was a problem hiding this comment.
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.
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.
I am not sure about test fixtures, probably @FumingZhang or @zhoxing-ms can help clarify
There was a problem hiding this comment.
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.
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.
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.
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.
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 |
--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.