Describe the bug
Command Name
az aks update -enable-secret-rotation
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object does not support item assignment
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/custom.py", line 1585, in aks_update
mc = aks_update_decorator.update_mc_profile_default()
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5674, in update_mc_profile_default
mc = self.update_addon_profiles(mc)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5588, in update_addon_profiles
self.update_azure_keyvault_secrets_provider_addon_profile(azure_keyvault_secrets_provider_addon_profile)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 5522, in update_azure_keyvault_secrets_provider_addon_profile
azure_keyvault_secrets_provider_addon_profile.config[
TypeError: 'NoneType' object does not support item assignment
To Reproduce:
When you create a cluster and you enable the secret store CSI drive from the Azure portal you have the following:
$ az aks show -n {} -g {} | jq .addonProfiles.azureKeyvaultSecretsProvider.config
null
This is not good and leads to the python TypeError. When you create a AKS cluster with the CLI you get a different value:
az aks show -n {} -g {} -o json | jq .addonProfiles.azureKeyvaultSecretsProvider.config
{
"enableSecretRotation": "true",
"rotationPollInterval": "2m"
}
Expected Behavior
The command az aks update --enable-secret-rotation should work when .addonProfiles.azureKeyvaultSecretsProvider.config is null.
Environment Summary
Linux-5.4.0-1085-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.10.4
Installer: DEB
azure-cli 2.37.0
Extensions:
ai-examples 0.2.5
ssh 1.1.1
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Describe the bug
Command Name
az aks update -enable-secret-rotationErrors:
To Reproduce:
When you create a cluster and you enable the secret store CSI drive from the Azure portal you have the following:
This is not good and leads to the python
TypeError. When you create a AKS cluster with the CLI you get a different value:Expected Behavior
The command
az aks update --enable-secret-rotationshould work when.addonProfiles.azureKeyvaultSecretsProvider.configisnull.Environment Summary