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

Yuyu3/fix upgrade public #85

Merged
merged 4 commits into from
Nov 9, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
inferenceLoadBalancerHA
  • Loading branch information
Yue Yu committed Nov 8, 2021
commit ee4693cfbd54139327d8c7514e29aaf9206916af
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def Delete(self, cmd, client, resource_group_name, cluster_name, name, cluster_t

def Update(self, cmd, resource_group_name, cluster_name, auto_upgrade_minor_version, release_train, version, configuration_settings,
configuration_protected_settings):
self.__normalize_config(configuration_settings, configuration_protected_settings)

if len(configuration_protected_settings) > 0:
subscription_id = get_subscription_id(cmd.cli_ctx)

Expand Down Expand Up @@ -213,6 +215,17 @@ def Update(self, cmd, resource_group_name, cluster_name, auto_upgrade_minor_vers
configuration_settings=configuration_settings,
configuration_protected_settings=configuration_protected_settings)

def __normalize_config(self, configuration_settings, configuration_protected_settings):
# inference
isTestCluster = _get_value_from_config_protected_config(
self.inferenceLoadBalancerHA, configuration_settings, configuration_protected_settings)
if isTestCluster is not None:
isTestCluster = str(isTestCluster).lower() == 'false'
if isTestCluster:
configuration_settings['clusterPurpose'] = 'DevTest'
else:
configuration_settings['clusterPurpose'] = 'FastProd'

def __validate_config(self, configuration_settings, configuration_protected_settings):
# perform basic validation of the input config
config_keys = configuration_settings.keys()
Expand Down