CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
527 stars 159 forks source link

ContainerApps support for storage #941

Closed et1975 closed 2 years ago

et1975 commented 2 years ago

This PR adds support for poorly documented storage mounting.

The changes in this PR are as follows:

I have read the contributing guidelines and have completed the following:

            containerApp {
                name "queuereaderapp"
                add_volumes [ Volume.emptyDir "empty-v"
                              Volume.azureFile "certs-v" (ResourceName "certs") myStorageAccount.Name StorageAccessMode.ReadOnly ]
                add_containers [
                    container {
                        name "queuereaderapp"
                        public_docker_image "mcr.microsoft.com/azuredocs/containerapps-queuereader" ""
                        cpu_cores 0.25<VCores>
                        memory 0.5<Gb>
                        add_volume_mounts [ "empty-v", "/tmp"
                                            "certs-v", "/certs" ]
                    }
                ]

For Azure File volumes we create additional proxy resource ManagedEnvironmentStorage under the hood.

Not clear on the purpose of ephemeralStorage, but it's in the ARM spec, so I've added it.

Current UI is useless at showing any of this.

ninjarobot commented 2 years ago

Thanks for the contribution, this is released in 1.7.4 and available on nuget.