-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Please provide us with the following information:
This issue is a: (mark with an x)
- [ X ] bug report -> please search issues before submitting
- documentation issue or request
- regression (a behavior that used to work and stopped in a new release)
Issue description
There appears to be an issue where a Container Registry secret was created from a previous Container App, but is null and it prevents other Container Apps from being modified.
Steps to reproduce
Create a Container App and specify registry credentials.
Create another container app and don't specify registry credentials.
Try to update the 2nd container app YAML and it fails with secrets being null.
az containerapp create \
--name $ACA_WEB_NAME \
--resource-group $RESOURCE_GROUP \
--image $ACA_WEB_IMAGE \
--environment $ACA_ENV_NAME \
--target-port 3334 \
--ingress 'external' \
--registry-server $REGISTRY_SERVER \
--registry-username $REGISTRY_USERNAME \
--registry-password $REGISTRY_PASSWORD \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 1
➜ ACA_NAME=helloworld
➜ az containerapp create \
--name $ACA_NAME \
--resource-group $RESOURCE_GROUP \
--environment $ACA_ENV_NAME \
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
--target-port 80 \
--ingress 'external' \
--query properties.configuration.ingress.fqdn
Command group 'containerapp' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
- Running ..
Container app created. Access your app at https://helloworld.livelycliff-917e6386.eastus.azurecontainerapps.io/
"helloworld.livelycliff-917e6386.eastus.azurecontainerapps.io"
➜ az containerapp show -n $ACA_WEB_NAME -g $RESOURCE_GROUP -o yaml > helloworld.yaml
WARNING: Command group 'containerapp' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
## NOTE. No changes to helloworld.yaml have been made. But in the file, there is a refernce to a secret that I don't think should be there from a previous Container App.
"spaghettidetective" is a Container App I created beforehand.
properties:
configuration:
registries:
- passwordSecretRef: spaghettidetectiveazurecrio-spaghettidetective
server: spaghettidetective.azurecr.io
username: spaghettidetective
secrets:
- name: spaghettidetectiveazurecrio-spaghettidetective
➜ az containerapp update -n $ACA_WEB_NAME -g $RESOURCE_GROUP --yaml helloworld.yaml
Command group 'containerapp' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Invalid Request: Container app secret(s) with name(s) 'spaghettidetectiveazurecrio-spaghettidetective' cannot have a value of null.
Expected behavior
I expect to be able to update an un-modified configuration without error. Ultimately, I'd like to be able to modify the YAML to add a mount, but this prevents me from getting that far.
Actual behavior
Updating the Container App YAML fails, even if it's unmodified. I believe it's due to a Contaienr Registry secret from a previous Container App.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Ex. Did this issue occur in the CLI or the Portal?