right now i work on a pipeline to deploy our microservices to an azure-container-apps environment.
The deployment is done via azure-pipelines, since we use a TFS on prem i need to deploy new versions in a pipeline step with azure cli. For that i use the following command:
az containerapp update
--name my-service
--resource-group rg-sample
--image sample.azurecr.io/my-service:8440
--min-replicas 1
--max-replicas 10
This works perfectly new revisions get published and receive all the traffic, and that is exactly the problem im facing.
I know i can activate revisions with the az containerapp revision activate
, but the containerapp update command automatically activates the latest revision with a weight of 100%, at least that is what i can see when i review changes with the azure portal.
Im looking for a way to deploy new revisions with azure cli, but with the limitation that the latest revision which was at 100% percent traffic before the deployment, stays there until i say via azure cli switch over to that revision.
Has anyone an idea how to archive that?
Best Erik