chore(kuma-cp) generate static outbound routes #1098
Merged
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.
Summary
This PR changes that Routes for outbound listeners are send embedded in listeners instead of dynamically through RDS.
We already use embedded route in the inbound listener
Motivation
RDS really makes sense when you have many routes to one listener and you change them a lot.
Right now we have 1 route per listener and we don't change it after we create it.
Listener does not need to wait for routes anymore (listener is warming before it receives routes through RDS)
This saves us extra discovery request/response and potential bugs of warming like this one #1012
Fix #1012 because there is no warming because of RDS anymore
I also turned
validateCluster
from Route as recommended in docshttps://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route.proto
Users may wish to override the default behavior in certain cases (for example when using CDS with a static route table).
(also it did not make sense to have it to
true
on RDS, because there was no guarantee that Cluster was delivered before route)I also needed to adjust Proxy Template Modification so modifications on VirtualHost that are embedded in the listener.
Documentation