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

Add a better support for using reference in dapr components to make development easier #6965

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

paule96
Copy link
Contributor

@paule96 paule96 commented Dec 18, 2024

Description

This draft PR is the first step to provide better integration of dapr components with the concepts of aspire.
Currently this should be only considered as work in progress. I hope to get some feedback for this implementation.
The idea of the implementation is almost a year old and can be found here: #2735

Now let's get started on what the PR does and why it's important.

Short explanation of Dapr

Dapr is a framework that is build on basically 3 things:

  • components
  • the sidecar
  • the application

Components from a developer perspective are files that configure a connection to a thridparty system that brings some defined purpose to your application. For example can you use RabbitMq as an Publisch and Subscribe Service to manage Events in your Application.

The Sidecar is a small application that sits next to your application and is used by your application, to talk to the configured components. The sidecar will load the component configuration files at startup.

Why this PR

Currently if you used dapr in your application and you wanted to use and configure your components, you needed to first install the 3rd Party systems on your development Machine, then write the component Configuration Files by your self.

After that befor your hit F5 in your Visual Studio you were forced to check if all your 3rd party systems are up and running so you will not a get an error when you sidecars start.

With this PR your are able for most dapr components (if they support connectionstrings), to define these 3rd party systems in your aspire.host and connect them in a common why to your sidecar.
So all you need todo now is hitting F5.

No scope of this PR

This PR doesn't focus on anything about deployment time. So even with this PR you can not just publish your dapr application and be happy. You still need to configure the dapr components manually.

Another issue is the very basic implementation of the secret store (see the dapr playground). It will more less only work with pre deployed secret stores or the local file secret store.

Fixes potentially the following issues

#4477
#3039

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No yet
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

cc @philliphoff

Microsoft Reviewers: Open in CodeFlow

paule96 and others added 4 commits December 16, 2024 09:02
- references to components that provides a connections string
- add basic support to implement a secret store

Signed-off-by: Paul Jeschke <[email protected]>
…roduce SecretKeyRef for secret management

Signed-off-by: Paul Jeschke <[email protected]>
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant