Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bsourabh1 opened this issue Feb 7, 2025 · 2 comments

Comments

@bsourabh1
Copy link

bsourabh1 commented Feb 7, 2025

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? 🤔

@kostis-codefresh
Copy link
Collaborator

Yes I think your assumption is correct.

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

@bsourabh1
Copy link
Author

bsourabh1 commented Feb 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants