rollouts-plugin-trafficrouter-gatewayapi icon indicating copy to clipboard operation
rollouts-plugin-trafficrouter-gatewayapi copied to clipboard

Gateway API supports traffic splitting between services in different namespaces, can the plugin also do it?

Open bsourabh1 opened this issue 10 months ago • 2 comments

HttpRoute can split traffic between services in different namespaces.

kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: argo-rollouts-http-route
  namespace: infra
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: kong
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /fruits
      backendRefs:
        - name: bananas-echo
          port: 1027
          kind: Service
          namespace: bananas
        - name: apples-echo
          port: 1027
          kind: Service
          namespace: apples

The Rollout with this config.

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
  namespace: default
spec:
  replicas: 10
  strategy:
    canary:
      canaryService: bananas-echo # our created canary service
      stableService: apples-echo # our created stable service
      trafficRouting:
        plugins:
          argoproj-labs/gatewayAPI:
            httpRoute: argo-rollouts-http-route # our created httproute
            namespace: infra

I tried to run this but its not able to find the services, I am assuming it does not work because Argo Rollout by itself does not support multi namespace rollout. Is the assumption correct? 🤔

bsourabh1 avatar Feb 07 '25 04:02 bsourabh1

Yes I think your assumption is correct.

Did you take a look at the controller logs for this rollout? Was there an error message?

kostis-codefresh avatar Feb 07 '25 08:02 kostis-codefresh

Sorry I deleted the entire setup from my local but on the Argo Rolllout dashboard, it was complaining about not being able to find both the services as I think Rollout CRD and Service are required to be in the same namespace. The setup was:

Gateway Provider: Kong
Rollout ns: default
HttpRoute ns: infra
Service 1 ns: bananas
Service 2 ns: apples

Appropriate ReferenceGrant was also present.

bsourabh1 avatar Feb 07 '25 09:02 bsourabh1