Add option to set DAPR protocol for Container Apps#1100
Add option to set DAPR protocol for Container Apps#1100fatim wants to merge 9 commits intoCompositionalIT:masterfrom
Conversation
…feature/containerApp-dapr
|
Thanks for this contribution! This looks great in principle. @isaacabraham is going to have a look at it, apologies for the delay. |
isaacabraham
left a comment
There was a problem hiding this comment.
This looks great - just a small change which will add some type safety and improve usability.
| DaprConfig: {| AppId: string option | ||
| Port: uint16 option |} option | ||
| Port: uint16 option | ||
| Protocol: string option |} option |
There was a problem hiding this comment.
I would make a type for the protocol e.g.
[<RequireQualifiedAccess>]
type DaprProtocol = Grpc | HttpDoing this will make it easier for individuals to know what the available valid options are, rather than a raw string.
| enabled = true | ||
| appId = settings.AppId | ||
| appPort = settings.Port |> Option.toNullable | ||
| appProtocol = settings.Protocol |
There was a problem hiding this comment.
With Protocol now a union rather than a string, this code will need a pattern match to emit the correct string e.g.
match settings.Protocol with Http -> "http" | Gprc -> "grpc"etc.
|
Hi @fatim, thanks for your contribution 🙂 Would you like to make the changes that Isaac suggested, or would you prefer that someone else picks up this PR? |
|
Let's give this another week - if it's not worked on, we should close this PR but add an issue to revisit it at a later date. |
This PR closes #1083
The changes in this PR are as follows:
I have read the contributing guidelines and have completed the following:
If I haven't completed any of the tasks above, I include the reasons why here:
I don't have experience using container apps with Dapr in Azure.
This change produces correct ARM config, I've used this doc as a reference - https://learn.microsoft.com/en-us/azure/container-apps/enable-dapr?tabs=arm1
Could somebody test this in Azure.
Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure: