Skip to content
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} Remove HTTP Proxy Config related code after GA #5655

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

0.5.121
+++++++
* Remove defender related code after GA, reuse the implementation in azure-cli/acs.
* Remove check_raw_parameters in update code path, reuse the implementation in azure-cli/acs.
* Remove oidc issuer related code after GA, reuse the implementation in azure-cli/acs.
* Fix monitoring addon option `--enable-syslog` for `aks addon enable`.
* Remove deprecated option `--node-zones`, use `--zones` instead.
* Remove gpu instance profile related code after GA, reuse the implementation in azure-cli/acs.
* Remove http proxy config related code after GA, reuse the implementation in azure-cli/acs.

0.5.120
+++++++
Expand Down
58 changes: 0 additions & 58 deletions src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,40 +188,6 @@ def get_addon_consts(self) -> Dict[str, str]:
addon_consts["CONST_GITOPS_ADDON_NAME"] = CONST_GITOPS_ADDON_NAME
return addon_consts

def get_http_proxy_config(self) -> Union[Dict, ManagedClusterHTTPProxyConfig, None]:
"""Obtain the value of http_proxy_config.

:return: dictionary, ManagedClusterHTTPProxyConfig or None
"""
# read the original value passed by the command
http_proxy_config = None
http_proxy_config_file_path = self.raw_param.get("http_proxy_config")
# validate user input
if http_proxy_config_file_path:
if not os.path.isfile(http_proxy_config_file_path):
raise InvalidArgumentValueError(
"{} is not valid file, or not accessable.".format(
http_proxy_config_file_path
)
)
http_proxy_config = get_file_json(http_proxy_config_file_path)
if not isinstance(http_proxy_config, dict):
raise InvalidArgumentValueError(
"Error reading Http Proxy Config from {}. "
"Please see https://aka.ms/HttpProxyConfig for correct format.".format(
http_proxy_config_file_path
)
)

# In create mode, try to read the property value corresponding to the parameter from the `mc` object
if self.decorator_mode == DecoratorMode.CREATE:
if self.mc and self.mc.http_proxy_config is not None:
http_proxy_config = self.mc.http_proxy_config

# this parameter does not need dynamic completion
# this parameter does not need validation
return http_proxy_config

def get_pod_cidrs_and_service_cidrs_and_ip_families(self) -> Tuple[
Union[List[str], None],
Union[List[str], None],
Expand Down Expand Up @@ -1961,16 +1927,6 @@ def set_up_addon_profiles(self, mc: ManagedCluster) -> ManagedCluster:
mc.addon_profiles = addon_profiles
return mc

def set_up_http_proxy_config(self, mc: ManagedCluster) -> ManagedCluster:
"""Set up http proxy config for the ManagedCluster object.

:return: the ManagedCluster object
"""
self._ensure_mc(mc)

mc.http_proxy_config = self.context.get_http_proxy_config()
return mc

def set_up_pod_security_policy(self, mc: ManagedCluster) -> ManagedCluster:
"""Set up pod security policy for the ManagedCluster object.

Expand Down Expand Up @@ -2180,8 +2136,6 @@ def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) ->
# DO NOT MOVE: keep this on top, construct the default ManagedCluster profile
mc = self.construct_mc_profile_default(bypass_restore_defaults=True)

# set up http proxy config
mc = self.set_up_http_proxy_config(mc)
# set up pod security policy
mc = self.set_up_pod_security_policy(mc)
# set up pod identity profile
Expand Down Expand Up @@ -2361,16 +2315,6 @@ def update_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster

return mc

def update_http_proxy_config(self, mc: ManagedCluster) -> ManagedCluster:
"""Set up http proxy config for the ManagedCluster object.

:return: the ManagedCluster object
"""
self._ensure_mc(mc)

mc.http_proxy_config = self.context.get_http_proxy_config()
return mc

def update_kube_proxy_config(self, mc: ManagedCluster) -> ManagedCluster:
"""Update kube proxy config for the ManagedCluster object.

Expand Down Expand Up @@ -2676,8 +2620,6 @@ def update_mc_profile_preview(self) -> ManagedCluster:
# DO NOT MOVE: keep this on top, fetch and update the default ManagedCluster profile
mc = self.update_mc_profile_default()

# set up http proxy config
mc = self.update_http_proxy_config(mc)
# update pod security policy
mc = self.update_pod_security_policy(mc)
# update pod identity profile
Expand Down