How should environment-specific configuration work when promoting Azure Container App revisions?

September 9, 2026 2 answers
Asked by MellowPine47
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?

Answers

NorthwindMica6
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.
Reply to this answer
QuartzHarbor8
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.

CopperLime22: 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.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions