Originally mentioned here: https://knative.slack.com/archives/C012AK2FPK7/p1660149435405279
One overriding concern I have that limits my knative deployments is the pseudo requirement to pass through so many proxies due to the VirtualService config. I have to pass the traffic from the ingress gateway to the cluster local gateway then to the activator/service. It would be awesome if we can reconfigure the knative generated VirtualService to skip the need for the cluster local gateway.
The -mesh and -ingress VSs seem identical except for the gateway, any reason this isn't one VS with two gateways? In any case, if the only VS that needed updating was a delegate VS we could wire that right in from [our] top level VS and skip that cluster local gateway. That same delegate VS could be used in the existing -ingress and -mesh VS definitions.
As an example, I'll use a VS to delegate a single route to a ksvc.
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: example
spec:
hosts:
- api.example.com
gateways:
- "ops/ingress"
http:
- name: "something"
match:
- uri:
prefix: "/something"
delegate:
name: something
namespace: this
- name: someksvc
match:
- uri:
prefix: "/somethingelse"
rewrite:
# Rewrite the original host header to the host header of service
# in order to redirect requests to service.
authority: ksvc-name.this.svc.cluster.local
route:
- destination:
host: cluster-local-gateway.istio-system.svc.cluster.local
port:
number: 80
if Knative would add a VirtualService that is delegatable, the ingress proxy could communicate directly with activator/service without the need of the cluster-local-gateway and the extra hops, the extra network $$ and the extra configuration madness.
Every ksvc gets two VirtualServices.
someksvc-ingress ["knative-serving/cluster-local-gateway"] ["someksvc.this","someksvc.this.svc","someksvc.this.svc.cluster.local"] 7d2h
someksvc-mesh ["mesh"] ["someksvc.this","someksvc.this.svc","someksvc.this.svc.cluster.local"] 7d2h
Knative appears to edit both of those VSs for every change. This services can not be used for delegates because they contain host names. If a delegate VS is added with no hosts, we can delegate a route and have the ingress gateway connect to the service directly without the hop through the cluster local gateway. That same delegate VS could then be added as a route for the -ingress and -mesh gateways and only THAT updated every time knative needs to swap between a service and activator.
Originally mentioned here: https://knative.slack.com/archives/C012AK2FPK7/p1660149435405279
One overriding concern I have that limits my knative deployments is the pseudo requirement to pass through so many proxies due to the VirtualService config. I have to pass the traffic from the ingress gateway to the cluster local gateway then to the activator/service. It would be awesome if we can reconfigure the knative generated VirtualService to skip the need for the cluster local gateway.
The -mesh and -ingress VSs seem identical except for the gateway, any reason this isn't one VS with two gateways? In any case, if the only VS that needed updating was a delegate VS we could wire that right in from [our] top level VS and skip that cluster local gateway. That same delegate VS could be used in the existing -ingress and -mesh VS definitions.
As an example, I'll use a VS to delegate a single route to a ksvc.
if Knative would add a VirtualService that is delegatable, the ingress proxy could communicate directly with activator/service without the need of the cluster-local-gateway and the extra hops, the extra network $$ and the extra configuration madness.
Every ksvc gets two VirtualServices.
Knative appears to edit both of those VSs for every change. This services can not be used for delegates because they contain host names. If a delegate VS is added with no hosts, we can delegate a route and have the ingress gateway connect to the service directly without the hop through the cluster local gateway. That same delegate VS could then be added as a route for the -ingress and -mesh gateways and only THAT updated every time knative needs to swap between a service and activator.