Skip to content
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

Allow Dapr to use http protocol for functions #515

Open
salaboy opened this issue Jan 30, 2024 · 1 comment
Open

Allow Dapr to use http protocol for functions #515

salaboy opened this issue Jan 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@salaboy
Copy link

salaboy commented Jan 30, 2024

Description

Working with async functions and trying to publish events using the Dapr APIs is impossible with the current setup.

Currently, dapr sidecars are started with app-protocol grpc. This limits the connections to deliver events to the application to have a grpc endpoint that requires a bidirectional connection to be open between the function and the sidecar.

This is a problem because the function might be downscaled (and even if the mode is set to standalone, the channel will be closed).
Allowing HTTP app-protocol will enable the dapr sidecar to send an http requests to the function that will work even if the function was downscaled.

@salaboy salaboy added the enhancement New feature or request label Jan 30, 2024
@wrongerror
Copy link
Member

You can configure the Dapr sidecar’s protocol by setting the annotations in OpenFunction. The annotation is: dapr.io/app-protocol: http. This will allow you to use the Dapr API to publish events to asynchronous functions.

apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
  name: cron-input-kafka-output
spec:
  serving:
    annotations:
      openfunction.io/enable-dapr: "true"
      dapr.io/app-protocol: "http"
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants