rollouts-plugin-trafficrouter-gatewayapi
rollouts-plugin-trafficrouter-gatewayapi copied to clipboard
Header based routing does not work if original HTTP route has filters on it
The header based routing example only works if the existing HTTP route has no filters.
This works
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: my-smart-route
spec:
parentRefs:
- name: traefik-gateway
namespace: default
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: argo-rollouts-stable-service
kind: Service
port: 80
- name: argo-rollouts-canary-service
kind: Service
port: 80
This does not work
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: my-smart-route
spec:
parentRefs:
- name: traefik-gateway
namespace: default
rules:
- matches:
- path:
type: PathPrefix
value: /smart/
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /
backendRefs:
- name: argo-rollouts-stable-service
kind: Service
port: 80
- name: argo-rollouts-canary-service
kind: Service
port: 80
Full example is here.
When a header based http route is created it should copy all the properties from the original route (including filters)
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
@kostis-codefresh were you able to figure out a workaround for this?
Nope. It is one of the things that I think we should fix anyway
Nope. It is one of the things that I think we should fix anyway
You're doing a nice job, I noticed there's been a PR for that here, will it be merge anytime soon?
It is still missing e2e tests.
If you could test that PR and let me know if it works for you, it would help me merge it much faster.
Does it work with your own example Rollout?
It is still missing e2e tests.
If you could test that PR and let me know if it works for you, it would help me merge it much faster.
Does it work with your own example Rollout?
@kostis-codefresh I have not be able to test the PR as I'm currently the lone DevOps guy on the team at work, and have been working on other things, but you can share me some pointers, I might just jump on it on a weekend.
You can use this container image for the plugin https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/pkgs/container/rollouts-plugin-trafficrouter-gatewayapi/487062609?tag=header-based-routing-filters
It is the same as 0.6.0 plus the contents of the PR
This is now part of 0.8.0