Azure / AKS

Azure Kubernetes Service
1.92k stars 284 forks source link

[BUG] "null collection frequency" if setting log analytics workspace ID during AKS creation #4245

Open JoeyC-Dev opened 3 weeks ago

JoeyC-Dev commented 3 weeks ago

Describe the bug If binding existing log analytics workspace for container insight during AKS creation, the collection frequency will be present as null.

To Reproduce Steps to reproduce the behavior:

location=switzerlandnorth
rG=my-ci-bug-10575
aks=my-ci-bug-10575
logAnalyticsWorkspace=my-aks-law-10575

# Basic set-up
az group create -n ${rG} -l ${location} -o none

az monitor log-analytics workspace create -n ${logAnalyticsWorkspace} -g ${rG}
logAnalyticsWorkspace_resId=$(az resource show -n ${logAnalyticsWorkspace} -g ${rG} --namespace Microsoft.OperationalInsights --resource-type workspaces --query id -o tsv)

# Wait 15 seconds for logAnalyticsWorkspace being provisioned.
sleep 15; az aks create -n ${aks} -g ${rG} --node-vm-size Standard_A4_v2 --node-count 2 \
-a monitoring --workspace-resource-id ${logAnalyticsWorkspace_resId} --enable-syslog \
--no-ssh-key

# Clean resource
az group delete -n ${rG}

Expected behavior The value for "collection frequency" and "Namespace Filtering" should be present.

Screenshots The screenshot is based on the result of the above script. image image

Environment (please complete the following information):

Additional context Not sure if I should submit this to azure-cli repo. It's hard for me to scope the root cause.