Azure Container Apps - Problems with mounting Azure Files to container
Hello!
I struggle with mounting an azure file storage to my container app. I tried to update an existing container app and also creating a new one and using the --yaml option to configure the container app. Each action fails with following error:
Invalid Request: Container app secret(s) with name(s) 'snekazurecrio-snek' cannot have a value of null.
Adding the storage definition to my container app environment works, its just the last step where I try to update my existing app with the modified yaml.
az containerapp update --name snek --resource-group snek-collection \
--yaml desktop/app.yaml
The secret is from my Azure Container Registry where my images are stored. It is definitely not null and shown in the azure portal of my container app.
I found this bug report:
https://github.com/microsoft/azure-container-apps/issues/259
It seems like the same issue. Is there any workaround? There has to be a way to simply mount an Azure File.
Here is my container app yaml:
id: /subscriptions/xxxxx/resourceGroups/snek-collection/providers/Microsoft.App/containerapps/snek-container-app
identity:
type: None
location: Germany West Central
name: snek-container-app
properties:
configuration:
activeRevisionsMode: Single
registries:
- passwordSecretRef: snekazurecrio-snek
server: snek.azurecr.io
username: snek
secrets:
- name: snekazurecrio-snek
customDomainVerificationId: xxxx
latestRevisionFqdn: ''
latestRevisionName: snek-container-app--bwkemig
managedEnvironmentId: /subscriptions/xxxxxx/resourceGroups/snek-collection/providers/Microsoft.App/managedEnvironments/snek-capp-env
outboundIpAddresses:
- 22.89.114.161
- 22.89.114.205
- 22.89.114.211
provisioningState: Succeeded
template:
containers:
- image: snek.azurecr.io/snek:latest
name: snek-container-app
volumeMounts:
- volumeName: config-folder
mountPath: /app/config
- volumeName: logs-folder
mountPath: /app/logs
volumes:
- name: config-folder
storageType: AzureFile
storageName: config-folder
- name: logs-folder
storageType: AzureFile
storageName: logs-folder
resources:
cpu: 0.5
memory: 1Gi
scale:
maxReplicas: 10
resourceGroup: data-integration
systemData:
createdAt: '2022-06-28T19:20:40.3410214'
createdBy: xxx.xxx@xxxxx.com
createdByType: User
lastModifiedAt: '2022-06-28T19:20:40.3410214'
lastModifiedBy: xxx.xxx@xxxx.com
lastModifiedByType: User
type: Microsoft.App/containerApps