-
Notifications
You must be signed in to change notification settings - Fork 249
Description
Currently, azd
deploys container apps (non-Aspire) by updating the container app properties in the main provisioning flow, then patching the container app image during azd deploy
.
The primary pain point is that users do not have the ability to patch the container app in a single revision with the provision + deploy flow (#3116). A secondary pain point is that if the user doesn't store the container app existence state in CI/CD scenarios, the container app image may be reset during CI/CD provisioning. The UX is also slightly more challenging since multiple parts in the application have to be set up and coordinate well together to build up the overall experience.
There are two ways we can consider splitting out container app deployment from provisioning:
- Container app deployed using Bicep
- Container app deployed using YAML
Container app deployed using Bicep
This is familiar for a person that is using and knowing Bicep. It is also quite common to have multiple Bicep modules that are deployed and managed independently. Bicep allows the user to reference any existing provisioned resources and link it to fill application environment settings.
The main drawback from azd's perspective is that azd interacts with Bicep opaquely. azd doesn't know if the user had provisioned other resources within the Bicep module. azd can only communicate with the Bicep module via input/outputs just like other provisioning modules.
Historically, this deployment mechanism was previously used by azd. It was noted to be slow, however this may have changed recently.
Container app deployed using YAML
This is familiar for a person that has prior K8s experience. A manifest style approach for an app operator that doesn't need to touch infrastructure. This provides the right amount of separation for the app developer without having to learn IaC.
The expectation would then be that azd
needs to provide and document templating functions to "tie-in" the container app to the rest of the application. At the very least, I could imagine:
- The context environment variables (especially a managed identity, if being used)
- The container app environment ID
- A way to reference KeyVault secrets
- A way to reference properties (perhaps
$.jsonpath
) of arbitrary ARM resources by resource ID
Discussion
Should container app deployment be split from provisioning?
Do you prefer deploying container app using Bicep or YAML?