Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FumingZhang committed Nov 8, 2024
1 parent 75b87ec commit 43a5174
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5245,15 +5245,15 @@ def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_g
create_cmd += f'--ampls-resource-id {ampls_resource_id} ' if use_ampls else ''
create_cmd += f'--enable-high-log-scale-mode ' if highlogscale_mode_enabled else ''

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

response = self.cmd(create_cmd, checks=[
self.check('addonProfiles.omsagent.enabled', True),
self.check('addonProfiles.omsagent.config.useAADAuth', 'true')
]).get_output_in_json()

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

cluster_resource_id = response["id"]
subscription = cluster_resource_id.split("/")[2]
workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"]
Expand Down

0 comments on commit 43a5174

Please sign in to comment.