Skip to content

Enable container tunnel via environment variable#12816

Merged
karolz-ms merged 1 commit intomainfrom
dev/karolz/containertunnel-env-var
Nov 7, 2025
Merged

Enable container tunnel via environment variable#12816
karolz-ms merged 1 commit intomainfrom
dev/karolz/containertunnel-env-var

Conversation

@karolz-ms
Copy link
Member

Make it a bit less dorky to enable container tunnel

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12816

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12816"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the EnableAspireContainerTunnel configuration from the DcpPublisher configuration section to an environment variable pattern, making it consistent with other Aspire configuration options.

Key Changes

  • Added a new ASPIRE_ENABLE_CONTAINER_TUNNEL constant to KnownConfigNames.cs
  • Updated DcpOptions.cs to read the setting from the environment variable instead of the DcpPublisher configuration section
  • Removed the DcpPublisher configuration section from the YARP playground's appsettings.json and added the environment variable to launchSettings.json

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Shared/KnownConfigNames.cs Added EnableContainerTunnel constant for the new environment variable name
src/Aspire.Hosting/Dcp/DcpOptions.cs Changed configuration source from dcpPublisherConfiguration to configuration using the new constant
playground/yarp/Yarp.AppHost/appsettings.json Removed the DcpPublisher configuration section that is no longer needed
playground/yarp/Yarp.AppHost/Properties/launchSettings.json Added ASPIRE_ENABLE_CONTAINER_TUNNEL environment variable to both https and http profiles

@karolz-ms
Copy link
Member Author

/backport to release/13.0

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19181678977

@karolz-ms karolz-ms merged commit 62c2d20 into main Nov 7, 2025
588 of 592 checks passed
@karolz-ms karolz-ms deleted the dev/karolz/containertunnel-env-var branch November 7, 2025 21:33
@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants