Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@
.WaitFor(redis);

var redisHost= redis.Resource.PrimaryEndpoint.Property(EndpointProperty.Host);
var redisTargetPort = redis.Resource.PrimaryEndpoint.Property(EndpointProperty.TargetPort);
var redisPort = redis.Resource.PrimaryEndpoint.Property(EndpointProperty.Port);

var pubSub = builder
.AddDaprPubSub("pubsub")
.WithMetadata(
"redisHost",
ReferenceExpression.Create(
$"{redisHost}:{redisTargetPort}"
$"{redisHost}:{redisPort}"
)
)
.WaitFor(redis);

if (redis.Resource.PasswordParameter is not null)
{
pubSub.WithMetadata("redisPassword", redis.Resource.PasswordParameter);
}

builder.AddProject<Projects.CommunityToolkit_Aspire_Hosting_Dapr_ServiceA>("servicea")
.WithDaprSidecar(sidecar =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public async Task BeforeStartAsync(DistributedApplicationModel appModel, Cancell

var aggregateResourcesPaths = sidecarOptions?.ResourcesPaths.Select(path => NormalizePath(path)).ToHashSet() ?? [];

var componentReferenceAnnotations = resource.Annotations.OfType<DaprComponentReferenceAnnotation>();
var componentReferenceAnnotations = daprSidecar.Annotations.OfType<DaprComponentReferenceAnnotation>();

var secrets = new Dictionary<string, string>();
var endpointEnvironmentVars = new Dictionary<string, IValueProvider>();
Expand Down
Loading