-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to set DAPR protocol for Container Apps #1100
base: master
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great - just a small change which will add some type safety and improve usability.
@@ -39,7 +39,8 @@ type ContainerAppConfig = | |||
Identity: ManagedIdentity | |||
Replicas: {| Min: int; Max: int |} option | |||
DaprConfig: {| AppId: string option | |||
Port: uint16 option |} option | |||
Port: uint16 option | |||
Protocol: string option |} option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a type for the protocol e.g.
[<RequireQualifiedAccess>]
type DaprProtocol = Grpc | Http
Doing this will make it easier for individuals to know what the available valid options are, rather than a raw string.
@@ -313,6 +315,7 @@ type ContainerApp = | |||
enabled = true | |||
appId = settings.AppId | |||
appPort = settings.Port |> Option.toNullable | |||
appProtocol = settings.Protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: