-
Notifications
You must be signed in to change notification settings - Fork 23
DNSPolicy targeting HTTPRoutes #567
Comments
I wonder is there a gap in policy attachment around hosts? So a targetRef can only target a single network resource, but a host can be shared across many network resources. For example 2 HTTPRoutes. If a policy does something at the host level (DNS for example) this becomes pretty complex. |
We've added targeting a host (as another subsection of a HTTPRoute or Gateway resource one can target) to Kuadrant's route selectors. E.g.: Say we have:
One that targets First conclusion I take from this is that
I don't see how the exemplified policy above should be defined at the gateway. We'd be asking the policy owner to go one level up (where required privileges are most likely not the same), to set a policy that only affects a subset of the network. Placing it at the route is the right thing to do IMO. You are defining rules for a subset of the traffic that is directed to a particular service. Maybe for the DNSPolicy the way to think this is not exactly the same as it only cares about hosts and not about other subsections that can be declared in a HTTPRoute, but I'll refer back to the description of this issue here, because I think targeting the route still makes sense. One thing that these examples have in common is that the hosts to target are declared at the HTTPRoutes, not in the Gateways.
This is true and we've been dealing (or not dealing) with it at other kinds of policies as well, like auth. Today, we have to make assumptions about who "owns" the host whenever there's a conflict. |
Right so that could be something we suggest to GWAPI. "A host is considered a "section" of the network and as such forms a natural boundary for policy. So a sectionName can be a host or named listener / route |
on conflict resolution. If we consider the host to be a section that can be targeted specifically or generically (regular target ref with no sectionName specified). It would seem like we could follow the rules but adjust them:
|
This issue is stale because it has been open for 60 days with no activity. |
This issue is stale because it has been open for 60 days with no activity. |
This issue was closed because it has been inactive for 30 days since being marked as stale. |
This issue is stale because it has been open for 60 days with no activity. |
By allowing DNSPolicies to target only Gateway objects, it's currently not possible to set Load Balancing rules for more specific hostnames specified only at the level of HTTPRoutes.
Sample use case
Given:
How can I declare load balance rules to split traffic between the two spoke clusters of requests sent to
foo.a.com
(other than the default 50%-50% round-robin one)? I want LB rules that are independent from any other LB rules I may have set for the complement in*.a.com
.Workaround
Current known workaround requires defining a new listener in the Gateway objects for the more specific hostname
foo.a.com
. I see 2 problem with this approach:The text was updated successfully, but these errors were encountered: