Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
403 stars 195 forks source link

Offer more storage options for container volumes in Azure Container apps when using aspire #3783

Open davidfowl opened 5 months ago

davidfowl commented 5 months ago

We added support for container volumes via azure files with SMB. It turns out that this incompatible with many Linux based containers. e.g. https://github.com/dotnet/aspire/issues/3685

To mitigate the issues with deployment here, we want to notify users preemptively that using azure files based volumes with these specific resources will not work, and instead they need to opt into a different storage mechanism https://learn.microsoft.com/en-us/azure/container-apps/storage-mounts (NFS or Ephemeral storage).

We need to decide if this requires doing infra synth and manually editing the volume, or using a feature flag to have azd do it. One complication is that the user may have a mix of resources that are both safe and no safe for azure files with SMB, how does the user express on a per resource basis that they want to use ephemeral storage vs azure files.

vhvb1989 commented 5 months ago

how does the user express on a per resource basis that they want to use ephemeral storage vs azure files.

We might be able to express both in bicep and have an input parameter to switch between ephemeral and non-ephemeral for each resource. A customer would just need to call something like

azd env set AZURE_RESOURCEnAME_EPHIMERAL_VOLUME true

That would switch the deployment to use storage-mounts, and by default, azd would use files (like it is now)