We're using blue/green and canary deployments in Azure Container Apps with revision labels. Each revision currently contains environment variables such as the API's auth-service URL and frontend URL. A staging revision points to staging dependencies and is tested through the staging label. The problem appears during promotion: moving the production label to that same revision also moves its staging configuration into production. Is there a native equivalent of App Service's sticky deployment-slot settings, or should the promotion process create a new production revision using the promoted image and production-specific configuration?
2 Answers
Container App environment variables are revision-level configuration, so a label move does not rewrite them. If staging and production need different values, keep those values outside the promoted artifact—such as environment-specific secrets, configuration references, or separate application settings—and inject the appropriate values when creating the revision. Otherwise, the deployment pipeline needs to create a new production revision with the promoted image and production configuration. There isn’t a label-swap setting that automatically makes revision variables environment-specific.
Treat canary or blue/green revisions as two versions of the same environment, rather than using one staging-configured revision as the production revision. The candidate should be able to run against production-compatible dependencies, with configuration supplied for the target environment. If that isn’t practical, promote the image or release identifier and build a separate production revision with production URLs and secrets. Also make API, auth, frontend, and database changes backward-compatible while both revisions receive traffic; otherwise traffic splitting alone won’t make the rollout safe.

The important distinction is that the values may not be baked into the image, but they are still baked into the revision definition. Repointing a label only changes traffic routing; it does not alter the revision’s environment variables.