Skip to content

Commit

Permalink
fix install issue on aks (#119)
Browse files Browse the repository at this point in the history
* fix install issue on aks

* Removing checking distribution

Co-authored-by: youhuatu <youhuatu@outlook.com>
  • Loading branch information
youhuatuyh and youhuatu-yh authored Apr 15, 2022
1 parent 7e5d012 commit 37fc852
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,18 @@ def Create(self, cmd, client, resource_group_name, cluster_name, name, cluster_t
resource = resources.get_by_id(
cluster_resource_id, parent_api_version)
cluster_location = resource.location.lower()
if resource.properties['totalNodeCount'] == 1 or resource.properties['totalNodeCount'] == 2:
configuration_settings['clusterPurpose'] = 'DevTest'
if resource.properties['distribution'].lower() == "openshift":
configuration_settings[self.OPEN_SHIFT] = "true"
try:
if cluster_type.lower() == 'connectedclusters':
if resource.properties['totalNodeCount'] < 3:
configuration_settings['clusterPurpose'] = 'DevTest'
if cluster_type.lower() == 'managedclusters':
nodeCount = 0
for agent in resource.properties['agentPoolProfiles']:
nodeCount += agent['count']
if nodeCount < 3:
configuration_settings['clusterPurpose'] = 'DevTest'
except:
pass
except CloudError as ex:
raise ex

Expand Down

0 comments on commit 37fc852

Please sign in to comment.