-
Notifications
You must be signed in to change notification settings - Fork 531
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
Allow disabling proxy for persistent lifetime container endpoints #7232
Merged
davidfowl
merged 11 commits into
dotnet:main
from
danegsta:dev/danegsta/persistentProxy
Jan 28, 2025
Merged
Allow disabling proxy for persistent lifetime container endpoints #7232
davidfowl
merged 11 commits into
dotnet:main
from
danegsta:dev/danegsta/persistentProxy
Jan 28, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danegsta
commented
Jan 24, 2025
davidfowl
reviewed
Jan 24, 2025
@JamesNK moved stuff around 😄 |
davidfowl
reviewed
Jan 24, 2025
danegsta
force-pushed
the
dev/danegsta/persistentProxy
branch
from
January 24, 2025 18:27
f55adeb
to
9e040d5
Compare
… timing of when some events fire.
danegsta
commented
Jan 25, 2025
danegsta
commented
Jan 25, 2025
danegsta
commented
Jan 25, 2025
danegsta
commented
Jan 25, 2025
danegsta
commented
Jan 25, 2025
/AzurePipelines run |
Pull request contains merge conflicts. |
danegsta
changed the title
Disable proxy for persistent lifetime container endpoints
Allow disabling proxy for persistent lifetime container endpoints
Jan 27, 2025
3 tasks
davidfowl
approved these changes
Jan 28, 2025
@danegsta good discussion and tradeoffs 😄. Can you make sure we document and update the relevant issue in 9.1? |
This was referenced Jan 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The endpoint port assignment for persistent lifetime containers can be confusing due to Aspire creating proxied endpoints for all resources by default. This means that the ports reported for persistent containers in the Aspire dashboard are only valid while the App Host is running and the only way to access persistent containers while the App Host is not running is to inspect them and figure out what random port the container endpoint was exposed on.
This PR adds a new opt-in (and experimental) resource builder API
.WithEndpointProxySupport(false)
that can disable all proxies for the endpoints of a given container resource. In the long run we'd like to make this the new default behavior for persistent containers, but there is additional service discovery work that will need to happen before we can safely make proxy-less persistent containers the default behavior.The main thing to be aware of when applying
.WithEndpointProxySupport(false)
to a container resource is that by default Aspire will attempt to use the (internal container) target port as the host port to expose the service. This significantly increases the risk of port conflicts or other issues allocating ports with the default behavior endpoint behavior. It's recommended that any resources being run with endpoint proxies disabled has explicit (unique) host ports set for all its endpoints.Fixes # (issue)
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):