Skip to content

Commit

Permalink
update(retina): remove network observability from cli (#7678)
Browse files Browse the repository at this point in the history
  • Loading branch information
snguyen64 committed Jun 6, 2024
1 parent cc0b3d4 commit f2a7e76
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 3,115 deletions.
9 changes: 0 additions & 9 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ aks create:
enable_windows_recording_rules:
rule_exclusions:
- option_length_too_long
enable_network_observability:
rule_exclusions:
- option_length_too_long
enable_advanced_network_observability:
rule_exclusions:
- option_length_too_long
Expand Down Expand Up @@ -204,12 +201,6 @@ aks update:
custom_ca_trust_certificates:
rule_exclusions:
- option_length_too_long
enable_network_observability:
rule_exclusions:
- option_length_too_long
disable_network_observability:
rule_exclusions:
- option_length_too_long
enable_advanced_network_observability:
rule_exclusions:
- option_length_too_long
Expand Down
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ To release a new version, please select a new version number (usually plus 1 to

Pending
+++++++

5.0.0b1
++++++++
* [BREAKING CHANGE]: Remove --enable-network-observability and --disable-network-observability from aks create and update commands.
* Update --enable-advanced-network-observability description to note additional costs and add missing flag to create command.
* Add etag support (--if-match, --if-none-match) to some aks commands for optimistic concurrency control.
* Change default value of `--vm-set-type` to VirtualMachines when `--vm-sizes` is set
Expand Down
9 changes: 0 additions & 9 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@
Used together with the "azure" network plugin.
Requires either --pod-subnet-id or --network-plugin-mode=overlay.
This flag is deprecated in favor of --network-dataplane=cilium.
- name: --enable-network-observability
type: bool
short-summary: Enable network observability on a cluster.
- name: --enable-advanced-network-observability
type: bool
short-summary: Enable advanced network observability functionalities on a cluster. Note that enabling this will incur additional costs.
Expand Down Expand Up @@ -1216,12 +1213,6 @@
- name: --nodepool-labels
type: string
short-summary: The node labels for all node pool. See https://aka.ms/node-labels for syntax of labels.
- name: --enable-network-observability
type: bool
short-summary: Enable network observability on a cluster.
- name: --disable-network-observability
type: bool
short-summary: Disable network observability on a cluster
- name: --enable-advanced-network-observability
type: bool
short-summary: Enable advanced network observability functionalities on a cluster. Note that enabling this will incur additional costs.
Expand Down
18 changes: 0 additions & 18 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,6 @@ def load_arguments(self, _):
hide=True,
),
)
c.argument(
"enable_network_observability",
action="store_true",
is_preview=True,
help="enable network observability for cluster",
)
c.argument(
"enable_advanced_network_observability",
action="store_true",
Expand Down Expand Up @@ -1279,18 +1273,6 @@ def load_arguments(self, _):
)
c.argument("safeguards_version", help="The deployment safeguards version", is_preview=True)
c.argument("safeguards_excluded_ns", is_preview=True)
c.argument(
"enable_network_observability",
action="store_true",
is_preview=True,
help="enable network observability for cluster",
)
c.argument(
"disable_network_observability",
action="store_true",
is_preview=True,
help="disable network observability for cluster",
)
c.argument(
"enable_advanced_network_observability",
action="store_true",
Expand Down
3 changes: 0 additions & 3 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ def aks_create(
enable_node_restriction=False,
enable_cilium_dataplane=False,
custom_ca_trust_certificates=None,
enable_network_observability=None,
enable_advanced_network_observability=None,
# nodepool
crg_id=None,
Expand Down Expand Up @@ -831,8 +830,6 @@ def aks_update(
safeguards_level=None,
safeguards_version=None,
safeguards_excluded_ns=None,
enable_network_observability=None,
disable_network_observability=None,
enable_advanced_network_observability=None,
disable_advanced_network_observability=None,
# metrics profile
Expand Down
41 changes: 0 additions & 41 deletions src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,26 +705,6 @@ def get_enable_cilium_dataplane(self) -> bool:
"""
return bool(self.raw_param.get('enable_cilium_dataplane'))

def get_enable_network_observability(self) -> Optional[bool]:
"""Get the value of enable_network_observability
:return: bool or None
"""
enable_network_observability = self.raw_param.get("enable_network_observability")
disable_network_observability = self.raw_param.get("disable_network_observability")
if enable_network_observability and disable_network_observability:
raise MutuallyExclusiveArgumentError(
"Cannot specify --enable-network-observability and "
"--disable-network-observability at the same time."
)
if enable_network_observability is False and disable_network_observability is False:
return None
if enable_network_observability is not None:
return enable_network_observability
if disable_network_observability is not None:
return not disable_network_observability
return None

def get_enable_advanced_network_observability(self) -> Optional[bool]:
"""Get the value of enable_advanced_network_observability
Expand Down Expand Up @@ -3037,11 +3017,6 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
else:
network_profile.network_dataplane = self.context.get_network_dataplane()

network_observability = self.context.get_enable_network_observability()
if network_observability is not None:
network_profile.monitoring = self.models.NetworkMonitoring( # pylint: disable=no-member
enabled=network_observability
)
advanced_network_observability = self.context.get_enable_advanced_network_observability()
if advanced_network_observability is not None:
network_profile.advanced_networking = self.models.AdvancedNetworking( # pylint: disable=no-member
Expand Down Expand Up @@ -4044,20 +4019,6 @@ def update_network_plugin_settings(self, mc: ManagedCluster) -> ManagedCluster:

return mc

def update_enable_network_observability_in_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
"""Update enable network observability of network profile for the ManagedCluster object.
:return: the ManagedCluster object
"""
self._ensure_mc(mc)

network_observability = self.context.get_enable_network_observability()
if network_observability is not None:
mc.network_profile.monitoring = self.models.NetworkMonitoring( # pylint: disable=no-member
enabled=network_observability
)
return mc

def update_enable_advanced_network_observability_in_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
"""Update enable advanced network observability of network profile for the ManagedCluster object.
Expand Down Expand Up @@ -5288,8 +5249,6 @@ def update_mc_profile_preview(self) -> ManagedCluster:
mc = self.update_nodepool_taints_mc(mc)
# update nodepool initialization taints
mc = self.update_nodepool_initialization_taints_mc(mc)
# update network_observability in network_profile
mc = self.update_enable_network_observability_in_network_profile(mc)
# update advanced_network_observability in network_profile
mc = self.update_enable_advanced_network_observability_in_network_profile(mc)
# update kubernetes support plan
Expand Down
Loading

0 comments on commit f2a7e76

Please sign in to comment.