-
Notifications
You must be signed in to change notification settings - Fork 684
Add proxyless endpoint support #2314
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
Conversation
Can you make a playground example with this feature? |
{ | ||
ea.UriScheme = "http"; | ||
ea.Port = 12345; | ||
ea.IsProxied = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only way to use it? Can you set it using the other WithEndpoint overloads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other WithEndpoint overloads are a mess, bunch of default parameters. To use it with an existing one you need to do:
ApiService.Resource.Annotations.OfType<EndpointAnnotation>().First().IsProxied = false;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add more the optional parameter to the base overload?
builder.AddProject<Projects.ProxylessEndToEnd_ApiService>("api") | ||
.WithEndpoint("http", ea => | ||
{ | ||
ea.UriScheme = "http"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We do "magic" today in the other WithEndpoint overload where the name is also the scheme.
A couple of questions:
|
Since I'm not an expert here I can't say for sure, but referencing a proxyless endpoint from another project works so far.
Throws for missing port. Containers aren't proxied so the flag does nothing I think? Will have to verify behavior here.
Yes, that's needed for |
This is what matters. We just need to make sure that calling WithReference continues to work and that URLs show up in the dashboard.
Containers are proxied by default. We have 3 ports:
My assumption is that when you say IsProxied=false, for a container, should throw and force you to specify a host port.
Excellent. Can you add a container with a proxyless port in your playground sample. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApplicationExecutor changes look good
@@ -454,6 +455,185 @@ await foreach(var resource in s.WatchAsync<Executable>(cancellationToken: token) | |||
} | |||
} | |||
|
|||
[LocalOnlyFact("docker")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any tests that use the new APIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e880c47
to
219b72a
Compare
Closes #1637
Microsoft Reviewers: Open in CodeFlow