-
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
Changes from all commits
14cb218
896d8f9
8a5b7fb
522a456
80aa27a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -581,6 +581,13 @@ def get_network_plugin_mode(self) -> Union[str, None]: | |
| # this parameter does not need validation | ||
| return network_plugin_mode | ||
|
|
||
| def get_network_policy(self) -> Union[str, None]: | ||
| """Get the value of network_dataplane. | ||
|
|
||
| :return: str or None | ||
| """ | ||
| return self.raw_param.get("network_policy") | ||
|
|
||
| def get_network_dataplane(self) -> Union[str, None]: | ||
| """Get the value of network_dataplane. | ||
|
|
||
|
|
@@ -3238,6 +3245,11 @@ def update_network_plugin_settings(self, mc: ManagedCluster) -> ManagedCluster: | |
| pod_cidr = self.context.get_pod_cidr() | ||
| if pod_cidr: | ||
| mc.network_profile.pod_cidr = pod_cidr | ||
|
|
||
| network_policy = self.context.get_network_policy() | ||
| if network_policy: | ||
| mc.network_profile.network_policy = network_policy | ||
|
||
|
|
||
| return mc | ||
|
|
||
| def update_enable_network_observability_in_network_profile(self, mc: ManagedCluster) -> ManagedCluster: | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4517,6 +4517,7 @@ def test_aks_migrate_cluster_to_cilium_dataplane(self, resource_group, resource_ | |
| create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ | ||
| '--network-plugin azure --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ | ||
| '--network-plugin-mode=overlay' | ||
|
|
||
| self.cmd(create_cmd, checks=[ | ||
| self.check('provisioningState', 'Succeeded'), | ||
| self.check('networkProfile.networkPlugin', 'azure'), | ||
|
|
@@ -4525,7 +4526,7 @@ def test_aks_migrate_cluster_to_cilium_dataplane(self, resource_group, resource_ | |
| ]) | ||
|
|
||
| # update to enable cilium dataplane | ||
| update_cmd = 'aks update -g {resource_group} -n {name} --network-dataplane=cilium' | ||
| update_cmd = 'aks update -g {resource_group} -n {name} --network-dataplane=cilium --network-policy=cilium' | ||
|
|
||
|
||
| self.cmd(update_cmd, checks=[ | ||
| self.check('provisioningState', 'Succeeded'), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.