-
Notifications
You must be signed in to change notification settings - Fork 576
Istio Mesh LB/Gateway + RouteRule v1alpha2 #254
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
proxy/v1/config/gateway.proto
Outdated
// protocol to use, SNI configuration for the load balancer, etc. | ||
// | ||
// For example, the following gateway spec sets up Envoy to act as a load | ||
// balancer exposing port 80 (http), 443 (https), and port 2379 (TCP). |
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.
Also port 9080?
proxy/v1/config/gateway.proto
Outdated
// clientCABundle: client.ca-bundle | ||
// | ||
// The following route rule forwards http requests for | ||
// uk.bookinfo.com/reviews, eu.bookinfo.com/reviews to the reviews service. |
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.
Which port on the reviews service?
Requests to the gateway port 80 redirects to https, right?
Requests to the gateway port 443 go where?
Requests to the gateway port 9080 go where?
In the actual Bookinfo example, we want gateway port 80 to forward to reviews:9080, right? I don't see anything in the config that specifies that. Maybe it's just a matter of making the example consistent end-to-end?
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.
Clarified.. I think the internal port is implicit. IOW, if reviews has only one HTTP port, it goes to that port, irrespective of that port. But if reviews has multiple HTTP ports, then the behavior is undefined. The undefined behavior is a bug and we need to fix. cc @ZackButcher @kyessenov
proxy/v1/config/gateway.proto
Outdated
// name: redis.prod | ||
// | ||
// By default, if there is no wildcard, HTTP requests for unknown domains | ||
// or requests that have no matching route rule will be responded with a |
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.
s/be responded with/respond with/
proxy/v1/config/gateway.proto
Outdated
// route: | ||
// - destination: | ||
// port: | ||
// number: 7777 |
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.
Does this redirect all ports (80, 443) to 7777/
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.
Yep. 80 to 443. 443, 9080 to 7777
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 you please add source port selection then? This seems rather uncommon example to conflate all ports into one.
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.
Why is this strange? The service port need not be the same as target port right? I agree that this example seems contrived, but it was there to illustrate the fact that you can have plaintext http ports in teh gateway.
proxy/v1/config/gateway.proto
Outdated
// name: bookinfo-rule | ||
// spec: | ||
// destination: | ||
// name: reviews.prod |
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 meant to uniquely identify a service, or just match addressing? E.g. if client addresses through reviews
, does this rule kick in?
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.
Good question. I think this should not apply if client simply says reviews.
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.
That would be counter intuitive. DNS resolution is identical for reviews
and reviews.prod
under the same context, so the existing application may use either of those names. You would need to enumerate all choices here:
destination:
- name: reviews
- name: reviews.prod
- name: reviews.prod.svc
- name: reviews.prod.svc.cluster
- name: reviews.prod.svc.cluster.local
- name: uk.bookinfo.com
- name: eu.bookinfo.com
Then the question still remains that reviews
is actually different in another namespace:
destination:
- name: reviews
- name: reviews.qa
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 and this is what I was trying to avoid. I just discovered few more ambiguities here. Per @louiscryan 's PR,
if we infer the namespace from the namespace the gateway is running on, then we could get away with just reviews
. That said, inheriting the top level destination into route.destination seems intuitive if and only if we are talking about just internal routing. From a gateway's perspective, it definitely needs some backend. i.e.
destination:
domains:
- uk.bookinfo.com
http:
route:
destination:
name: reviews.prod
rewrite:
uri: /foo
works but
destination:
domains:
- uk.bookinfo.com
http:
route:
rewrite:
uri: /foo
does not work, eventhough its a valid config. IF we decide to consider the above config as invalid, then internal route rules will become more verbose, i.e.
destination:
name: reviews
http:
route:
destination:
name: reviews
rewrite:
uri: /foo
A similar complication arises when we start using destination.port.
destination:
name: reviews
domains:
- uk.bookinfo.com
port:
- 6666
http:
route:
destination: reviews.prod
In the above rule, does 6666 apply to the gateway port or to the reviews service's port? If I want to write a rule1 against gateway port 9080 and a rule2 against gateway port 80, I need to make sure that I don't co mingle the rule with internal service names as the internal service might be using that port for some other purpose.
Thoughts? @ZackButcher / @louiscryan / @kyessenov ?
One option is to restrict the destination to have either name or domains. Another is to enforce the constraint that if destination has only domains, route.destination is mandatory. Along with these, we need to impose the constraint that port cannot be used when both name and domains are used in the destination.
This seems rather clunky.
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.
To clarify.
I think the match should occur on 'addressing' but we can decide to be permissive (destination name contextualized into FQDN matches application provided name contextualized into FQDN) or strict (names must match explicitly). I strongly suspect that permissive is pretty much what folks want universally.
'Destinations' are always internal though this can cover public hosts & IPs.
Binding a route rule to a gateway with no default destination is likely to be a mistake but it might not be worthwhile to reject it for the marginal value such validation would provide.
A route rule with no destination at all is definitely invalid, regardless of whether it's bound to a gateway or not.
I don't get why destination port is a problem, its just a refinement on the internal destination selection.
proxy/v1/config/gateway.proto
Outdated
// services using TLS with SNI. Standard DNS wildcard prefix syntax | ||
// is permitted. | ||
// | ||
// RouteRules that are bound to a gateway must having a matching domain |
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.
What's the purpose of this constraints? Can we inherit all domains from the gateway?
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.
Multiple route rules for the same gateway server?
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.
Assume gateway wants multiple route rules. Assume some of those rules care about the host header. Why not add a HTTP match condition on URI then?
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.
But what part of the gateway? It defines multiple virtual hosts on different ports.
proxy/v1/config/gateway.proto
Outdated
message TLSConfig { | ||
// REQUIRED: A set of hostnames associated with the server | ||
// certificate. For wildcard hostname, use * | ||
repeated string domains = 1; |
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.
How do we associate a TLS cert with a server listener? Based on domain suffix match? Since this is already a reference to a cert, should we put that reference into the server instead?
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’t the same cert be applicable across servers?
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.
Normally, one domain name = one cert. But you can have a wildcard cert for multiple listeners. I don't understand the benefit of the extra indirection listener -> TLS config -> certs. Why not just listener (server) -> certs.
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.
I simplified it.. PTAL
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.
As I'm sitting down and writing code to generate listeners from Gateways, having the TLS config embedded in the server is way more convenient. I like this improvement.
proxy/v1/config/gateway.proto
Outdated
// destination: | ||
// name: reviews.prod | ||
// domains: | ||
// - uk.bookinfo.com |
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.
It seems like this is capturing two names reviews.prod.svc.cluster.local
and eu.bookinfo.com
. What if we make destination
an array and match on EITHER of name
field values?
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.
That is not a bad idea. The only thing is to interpolate namespace. Also destination needs to be renamed to hosts for clarity. There are too many destinations.
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.
Destination is a mixer attribute namespace. We want consistent vocabulary. I'm fine either way, but then mixer needs to adopt host
as the primary attribute space.
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.
Destinations are names inside of the mesh, domains are names outside of the mesh. I think the distinction is important if we're talking about gateways bridging the external and internal worlds. If we conflate internal and external names I think it'll wind up more confusing than it needs to be (do I write a RouteRule for destination
reviews.prod.svc.cluster.local
, or eu.bookinfo.com
? Are both valid?).
What this is actually doing is not capturing two names; it's capturing that Host: eu.bookinfo.com
(an external name) routes to the service reviews.prod
(an internal name).
proxy/v1/config/gateway.proto
Outdated
// - uk.bookinfo.com | ||
// - eu.bookinfo.com | ||
// gateway: | ||
// - my-gateway #apply at my-gateway as well as reviews.prod internally |
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.
What does it mean to apply a gateway in a rule?
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.
That the rule selects itself to apply at the gateway. I am conflicted about this. @louiscryan seemed to think that this option was better than gateway selecting the rules. It seemed fine until I started describing the model.
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 source matching? What about the original source match clause?
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.
No, all this is doing is instructing Pilot to include these route rules in the config of ingress proxies exposing Gateway "my-gateway
". From there, we use the domain
to map from the external name to a destination
with an internal name.
Here's how IMO things should work:
Gateway a
exposes domains eu.bookinfo.com
and us.bookinfo.com
. Gateway b
exposes us.bookinfo.com
.
Then we define a RouteRule like:
metadata:
name: route-reviews
spec:
destination:
name: reviews.prod
domains:
- eu.bookinfo.com
- us.bookinfo.com
gateways:
- a
...
A request with Host: us.bookinfo.com
that hits Gateway a
will be routed according to the rule route-reviews
. The same request hitting Gateway b
results in a 404 because Gateway b
has no routes for us.bookinfo.com
; route-reviews
only applies to Gateway a
. A request inside of the mesh with a destination.service == reviews.prod
has destination selected according the route-reviews
as normal, the Gateway portion doesn't come in to play.
proxy/v1/config/gateway.proto
Outdated
// name: my-gateway | ||
// spec: | ||
// servers: | ||
// 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.
Why declare protocol at this level? To facilitate some API pattern.
Most properties at the gateway level are common among protocols unlike routing rules.
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.
That was a leftover from old version.. removing..
@louiscryan / @ZackButcher / @kyessenov / @frankbu I have moved the documentation to a separate temp file, as it was really talking about the routing rules, and not about the gateway. It seems that we are all in agreement about the gateway spec itself. So in the interest of moving this forward, do you guys have any concerns about the gateway spec? If not, we should merge and then iterate on the concerns for routing in subsequent PRs for routing.. |
@@ -0,0 +1,268 @@ | |||
// Copyright 2017 Istio Authors |
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.
redundant file?
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.
Its intentional.. I just wanted to retain the comments, so that I don't forget the comments. But this won't be merged in, until the routing is refined..
routing/v1alpha2/gateway.proto
Outdated
// | ||
message Gateway { | ||
// REQUIRED: A list of server specifications. | ||
repeated Server servers = 1; |
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.
What is the reason to not make "server" by the top-level config unit?
Logically, the configuration state is subdivided by domains, but it's three levels nested in the Gateway.
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.
Don't you want to refer to the gateway as a whole by its name, in the routing rule ?
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.
Are we assigning gateways to edge proxies? If all proxies run all gateways, then I want to bind a rule to a domain, not a gateway.
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.
Don't we want to assign gateways to proxies? For e.g., I won't want to expose the set of servers exposed by my internal gateway to the external gateway.
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.
Yup, I think we'll have use cases for tying gateways to specific sets of proxies.
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.
What's the model for binding gateways to proxies? Can we bind rules to those proxies instead of gateways?
I'm not sure what to make of it. It's unclear how traffic should be routed from the gateway without any destination or routing rule support. |
routing/v1alpha2/route_rule.proto
Outdated
// *Source* - A downstream client calling a service. | ||
// | ||
// *Host* - The address used by a client when attempting to connect to a | ||
// *service. |
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.
service
LGTM |
// name: bookinfo-rule | ||
// spec: | ||
// hosts: | ||
// - reviews.prod |
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.
How does this work for non-namespaced components (e.g. cloud-provided ingress controllers)?
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.
I'm not quite sure if you're asking about? The gateway in totality or just namespaced vs non-namespaced domains ?
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.
There seems to be some implicit DNS context depending where the rule is applied. Since some k8s components run out of cluster, we want to make sure the rule can apply there too.
routing/v1alpha2/gateway.proto
Outdated
// with a wildcard host and the desired backend. For example, the following | ||
// wildcard routing rule routes all traffic to homepage.prod by default. | ||
// | ||
// metadata: |
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.
missing kind and version
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.
fixed
// spec: | ||
// servers: | ||
// - port: | ||
// number: 80 |
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.
out of date example
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.
Why?
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.
LGTM. We should rationalize how we describe ports across our config, but IMO that doesn't block this PR.
routing/v1alpha2/route_rule.proto
Outdated
|
||
// The names of gateways that should apply these routes. A single route | ||
// rule could be used for sources inside the mesh as well as one or more | ||
// gateways. This selection condition imposed by this field is |
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.
s/This/The
// | ||
message Server { | ||
// Port describes the properties of a specific port of a service. | ||
message Port { |
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.
We really need to rationalize our usage of port, the current egress rule's port definition is a subset of this.
api/routing/v1alpha1/egress_rule.proto
Lines 47 to 53 in cda3855
message Port { | |
// A valid non-negative integer port number. | |
int32 port = 1; | |
// The protocol to communicate with the external services. | |
// MUST BE one of HTTP|HTTPS|GRPC|HTTP2. | |
string protocol = 2; | |
} |
Not blocking, but in a follow on we should extract this port definition out and share it across rules.
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.
I think at most we need two definitions: a source port definition (here) and a destination port definition (used in egress, and in a few other places in this PR, typically in the form of a oneof
).
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.
I tried doing this earlier. It’s not clean. Egress rule port is a spec. Same as gateway. But route rule port is a match. So some fields like protocol don’t make sense.
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.
fixed
routing/v1alpha2/route_rule.proto
Outdated
// collide with numbers. If there are multiple ports on a service with | ||
// the same protocol the names should be of the form <protocol-name>-<DNS | ||
// label>. | ||
oneof destination_port { |
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.
Same as above, why can't we just extract out and re-use a single Port
message. Having this many ways to specify the same concept is going to cause user confusion and inconsistencies in our implementations.
// version: v1 | ||
// weight: 100 | ||
// | ||
// A host name can be defined by only one RouteRule. A single route rule |
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.
So in this example, which reviews
service does this rule apply to, if there are multiple namespaces with reviews
service?
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.
local namespace of the pod where this rule is being applied.
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.
I think the comment needs some refinement for sure but its fair to start with the requirement that the host name is unique and relax it later.
If a name is unqualified we can try to qualify it in context (i.e namespace) before enforcing the uniqueness rule
routing/v1alpha2/route_rule.proto
Outdated
// referring to "reviews" would be resolved to the FQDN | ||
// "reviews.default.svc.cluster.local". However, a different name such as | ||
// "reviews.sales" would be treated as a FQDN during virtual host | ||
// matching. In Consul, a plain service name would be resolved to the |
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.
I don't understand this explanation. Do you mean I have to use reviews.sales.svc.cluster.local
as FQDN? What happens if I move my deployment to a different cluster suffix?
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.
clarified
// is possible to define a route rule that applies to both the gateway | ||
// and a specific internal workload by specifying gateways as well as the | ||
// source match condition in HTTP/TCP routes. | ||
repeated string gateways = 2; |
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.
Are gateways namespaced? All Istio config resources are currently namespaced
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.
Didn't think of it. We could I guess?
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.
That probably begs the question of how to refer to a gateway in another namespace but I think that can be in the string if necessary. E.g. "namespace/gateway", if we need to disambiguate.
// RouteRule for usage examples. | ||
message Destination { | ||
// REQUIRED: Service name from the service registry. The name can be a | ||
// short name, a fully qualified domain name or an IP address. If short |
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.
Define three fields for each type of naming?
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.
With one of?
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.
Don't think that would yield any usability benefit.
By the way, did you check if k8s allows multiple versions per CRD? Last time I checked, it was only one version supported. That means we need to define conversion function from alpha1 to alpha2. |
routing/v1alpha2/gateway.proto
Outdated
@@ -93,39 +93,42 @@ package istio.routing.v1alpha2; | |||
// user: dev-123 | |||
// route: | |||
// - destination: | |||
// port: 7777 | |||
// port: |
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.
I don't think the oneof will yield that output
routing/v1alpha2/route_rule.proto
Outdated
@@ -721,3 +713,13 @@ message HTTPFaultInjection { | |||
} | |||
} | |||
|
|||
// PortSelector specifies the name or number of a port to be used for |
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.
Why this type as opposed to the inline oneof ? It yields funky YAML
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.
@ZackButcher had this comment that we have the same one off everywhere.. repetition and chance of mistakes, etc.
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 yaml should look like:
port:
name: foo
and
port:
number: 7
Where the "port" in those snippets is the name of the PortSelector
field in the parent message. This is exactly what we want, I think.
On Mon, Dec 11, 2017 at 9:08 PM, Sven Mawson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In routing/v1alpha2/gateway.proto
<#254 (comment)>:
> + // Port describes the properties of a specific port of a service.
+ message Port {
+ // A valid non-negative integer port number.
+ int32 number = 1;
+
+ // The protocol to communicate with the external services.
+ // MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|REDIS|TCP.
+ string protocol = 2;
+
+ // Name assigned to the port.
+ string name = 3;
+ }
+
+ // REQUIRED: The Port on which Envoy should listen for incoming
+ // connections
+ Port port = 1;
The benefit is sharing of domains between ports on a server, and depending
on your perspective a more natural model (a server is a set of domains,
ports are opened for the server, ports have TLS settings).
The general principle is that this is a form of data normalization, our
goal is to minimize the amount of information users have to tell us in
order to get their job done, and especially minimize how often they repeat
themselves (DRY). Requiring the same set of domains be repeated multiple
times vs. allowing multiple ports per server increases the amount of
configuration needed for no clear gain.
As the set of information that ends up repeated grows, users get
increasingly annoyed, and eventually they write their own config layer on
top that generates our layer. I've seen this more times than I'd like to
admit (since it was my layer making them repeat themselves).
I can't find this comment on GH.. Are you saying that instead of
organizing by ports, we should organize by domains? I am not opposed to
this. I didn't have data on what is the more common format. I thought that
something like a port 80 with 10s of domains and an odd man out on port
9080, is a more common thing.
On the general comment, I totally agree. That was the reason I introduced
some iterator style functionality into the route rule that allows people to
specify multiple matches, multiple sources, etc. There is still a bit more
left to do there, but as with other things in routing, I would like to
drive it by use cases.
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AH0qdyBcCTPt5wJ9kzPBfJpiQJ6dMFquks5s_eAbgaJpZM4Qm21p>
.
|
// tls: | ||
// mode: simple #enables HTTPS on this port | ||
// serverCert: server.crt | ||
// clientCABundle: client.ca-bundle |
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.
Does this refer to CAs Envoy will use to validate trust of client certificates?
routing/v1alpha2/gateway.proto
Outdated
|
||
// Server describes the properties of the proxy on a given load balancer port. | ||
// For example, | ||
// metadata: |
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.
kind and version
// is permitted. | ||
// | ||
// RouteRules that are bound to a gateway must having a matching domain | ||
// in their default destination. Specifically one of the route rule |
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.
How is the default destination
determined? Is it one of, or the first domain listed in the array of hosts
for the RouteRule?
// services using TLS with SNI. Standard DNS wildcard prefix syntax | ||
// is permitted. | ||
// | ||
// RouteRules that are bound to a gateway must having a matching domain |
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.
What happens if a RouteRule is "bound" to a gateway but doesn't have a matching domain? How does an operator discover a misconfiguration?
Evaluating for CloudFoundry Usage: It's a bit early in our development stages to have full confidence on how this change will affect our implementation. It doesn't raise any immediate concerns and will potentially simplify our configurations, so we approve. Our expectations for our early work will probably be to statically configure the Envoy listeners instead of using the LDS from Pilot (still using RDS, CDS, and SDS). If we do use LDS in the future, it will certainly be nice to configure listeners separately from route rules, which the gateway resource enables. |
This proposal suggests a new Gateway configuration resource that describes a set of ports that should be exposed bridging two networks. A Gateway can act as an ingress allowing external traffic into the mesh and it can act as an egress allow traffic in the mesh to exit. A Gateway can also be used to model a proxy that is entirely internal to the mesh and implemented either by sidecars or by a middle proxy. Behaviors for the ports like supported protocols, TLS, SNI etc are described by the resource.
Users can then use standard Istio RouteRules to control HTTP requests & TCP traffic entering a Gateway by binding the gateway to a route rule. The route rule will be applied at the gateway if and only if the rule’s destination (or one of its domain aliases) corresponds to one of the wildcard domains supported by the Gateway.
Note that this is not the same as the recent proposals for multiple zones that advocate for a new access model (direct addressing of services across platforms). These proposals target users who fully buy into Istio and are willing to modify their applications, while the proposal here targets the more immediate need - deployments that already exist.
Detailed discussion can be found in https://goo.gl/96UTKQ