Skip to content

Container resource named aspire will lead to container network conflict #16644

@afscrome

Description

@afscrome

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The 13.3 container tunnel uses aspire.dev.internal as it's host name. But if you add a container resource named aspire, it will also use aspire.dev.internal as it's host name.

Expected Behavior

Either block creation of resources named aspire, or do something to resolve the naming conflict.

Steps To Reproduce

var builder = DistributedApplication.CreateBuilder(args);
builder.Configuration["ASPIRE_ENABLE_CONTAINER_TUNNEL"] = useContainerTunnel.ToString();

builder.AddResource(new MetricsResource())
    .WithHttpEndpoint();

var container = builder.AddContainer("aspire", "nginx")
    .WithHttpEndpoint(targetPort: 8080);

var two = builder.AddContainer("two", "nginx")
    .WithReference(container.GetEndpoint("http"))
    .WithOtlpExporter();

Exceptions (if any)

No response

Aspire doctor output

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions