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

Using environment variable for dapr sidecar host and using localhost instead of 127.0.0.1 as DAPR default sidecar host #1040

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ondmal
Copy link

@ondmal ondmal commented Feb 17, 2023

Description

  • retrieve default value of DAPR sidecar host from DAPR_HOST environment variable
  • use localhost instead of 127.0.0.1 as DAPR sidecar host default value if the environment variable is not specified

Issue reference

This PR will close: #1032

@ondmal ondmal requested review from a team as code owners February 17, 2023 10:55
@ondmal
Copy link
Author

ondmal commented Feb 17, 2023

One thing to consider.

WorkflowServiceCollectionExtensions class uses method TryGetGrpcAddress to validate the default GRPC endpoint and uses empty string if it is not well formed URI.

Maybe we should either validate the endpoint address when constructing the default (in DaprDefaults) or do not validate it at all (in WorkflowServiceCollectionExtensions).

In DaprDefaults we can use "localhost" and default port when the values in the environment variables are invalid to ensure that the default endpoint address will always be valid URI.

@artursouza
Copy link
Member

artursouza commented Jul 26, 2023

This impacts this PR.

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

Successfully merging this pull request may close these issues.

Use "localhost" instead of "127.0.0.1" for the sidecar host address
2 participants