Repository navigation
gatewayapi: add existingRefs to manage the weights of existing HTTPRoutes - #1998
hoffmannandrey wants to merge 1 commit into
Conversation
…utes Flagger generates a single HTTPRoute named after the apex Service. A service that is exposed through several routes (an ingress route with a URL rewrite and retries, a route for in-mesh traffic, an ALB route) cannot use it: the generated route replaces only one of them and cannot express the retry. Add spec.service.existingRefs. An entry names its target by kind and name, like gatewayRefs; only the HTTPRoute kind is supported, in the namespace of the Canary. When it is set Flagger does not generate an HTTPRoute. In every rule of a referenced route that has a backendRef to the apex, primary or canary Service it keeps exactly two backendRefs, primary and canary, with the computed weights, and leaves the rest of the route alone. With revertOnDeletion the apex Service is put back. Add spec.analysis.primaryMatch. Together with analysis.match, which pins a request to the canary, Flagger adds in front of every weighted rule one rule that pins a request to the canary and one that pins it to the primary: copies of the rule (filters, timeouts, retry) with the header or query parameter merged into the matches and a single backend. A version stays reachable at any weight, e.g. the primary while the canary is at 100% and not promoted. existingRefs needs the gatewayapi:v1 provider and the weighted analysis. It is rejected together with gatewayRefs, hosts, match, rewrite, headers, retries, timeout, backendTimeout, mirror, corsPolicy, analysis iterations, session affinity and mirroring, because the referenced routes keep their own configuration. Co-Authored-By: FOX AO (claude-sonnet-5-5) <ao-noreply@fox.com> AO-Session: acp-1791213051187990000 Signed-off-by: Andrey Hoffmann <andrey.hoffmann@fox.com>
|
We run Flagger 1.45.0 ( We tested this PR (
Two notes for the docs: when migrating from Would love to see this merged. |
Flagger generates a single HTTPRoute named after the apex Service. A service that is exposed through several routes (an ingress route with a URL rewrite and retries, a route for in-mesh traffic, an ALB route) cannot use it: the generated route replaces only one of them and cannot express the retry.
Add spec.service.existingRefs. An entry names its target by kind and name, like gatewayRefs; only the HTTPRoute kind is supported, in the Canary's namespace. When it is set Flagger does not generate an HTTPRoute. In every rule of a referenced route that has a backendRef to the apex, primary or canary Service it keeps exactly two backendRefs, primary and canary, with the computed weights, and leaves the rest of the route alone. With revertOnDeletion the apex Service is put back.
Add spec.analysis.primaryMatch. Together with analysis.match, which pins a request to the canary, Flagger adds in front of every weighted rule one rule that pins a request to the canary and one that pins it to the primary: copies of the rule (filters, timeouts, retry) with the header or query parameter merged into the matches and a single backend. A version stays reachable at any weight, e.g. the primary while the canary is at 100% and not promoted.
existingRefs needs the gatewayapi:v1 provider and the weighted analysis. It is rejected together with gatewayRefs, hosts, match, rewrite, headers, retries, timeout, backendTimeout, mirror, corsPolicy, analysis iterations, session affinity and mirroring, because the referenced routes keep their own configuration.