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

Canary support with argo rolll outs with kong traffic provider does not work seamlessly #65

Open
som-kanade-zepto opened this issue Aug 3, 2024 · 22 comments
Assignees
Labels
bug Something isn't working

Comments

@som-kanade-zepto
Copy link

Checklist:

Argo roll out image version : v1.7.0
Kong Version: 3.5
Argo roll out app version: 2.37.2

Describe the bug

<Tried Canary support with argo roll outs with kong traffic provider everything works and rollout happens BUT after some time (not fixed). other APIs which are routed via same gateway start failing where as there are no changes made to those http routes>

To Reproduce

  1. Install argo roll out
  2. Install kong ingress controller
  3. Followed this doc (https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/tree/main/examples/kong)
  4. Everything works as expected
  5. Existing API which shares same gateway start giving 5xx error where as no changes made to that object starts failing
  6. Deleting http object of sample app created using above documentation will fix the issue

Expected behavior

All routes should without any issues

Screenshots

We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.

Version

Argo roll out image version : v1.7.0
Argo roll out app version: 2.37.2

Logs

No specific errors in roll out controller when this issue happend


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@Philipp-Plotnikov
Copy link
Collaborator

Hi, you installed argo rollouts and it works, but other APIs using the same Gateway stopped to work and other APIs also uses HTTPRoute resources ? Can you say HTTPRoutes configurations have intersecations in rules, please ? It seems it is related with matching precedence https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteRule
Did you check it ?

@Philipp-Plotnikov Philipp-Plotnikov self-assigned this Aug 5, 2024
@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto did you solve the problem ? If yes, can you share your solution, please ?

@som-kanade-zepto
Copy link
Author

No there is no intersection between API Paths of 2 services that are failing

@Philipp-Plotnikov Philipp-Plotnikov added the bug Something isn't working label Aug 12, 2024
@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto did you check the logs of Kong controller and argo rollouts controller ? Did you see any errors or warnings there ?

@som-kanade-zepto
Copy link
Author

I was able to only see 5xx errors in kong nothing related to this with timeouts and very generic 5xx errors nothing related to this

@Philipp-Plotnikov
Copy link
Collaborator

Is it similar to create these 2 HTTPRoutes

kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
  name: test-httproute
  annotations:
    konghq.com/strip-path: 'true'
spec:
  parentRefs:
  - kind: Gateway
    name: kong
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: /api/v1/cart  
    backendRefs:
    - name: argo-rollouts-stable-service
      kind: Service
      port: 80
      weight: 50
    - name: argo-rollouts-canary-service
      kind: Service
      port: 80
      weight: 50
---
kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
  name: argo-rollouts-test-httproute
  annotations:
    konghq.com/strip-path: 'true'
spec:
  parentRefs:
  - kind: Gateway
    name: kong
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: /test  
    backendRefs:
    - name: argo-rollouts-stable-service
      kind: Service
      port: 80
    - name: argo-rollouts-canary-service
      kind: Service
      port: 80
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
  namespace: default
spec:
  revisionHistoryLimit: 1
  replicas: 3
  strategy:
    canary:
      canaryService: argo-rollouts-canary-service # our created canary service
      stableService: argo-rollouts-stable-service # our created stable service
      trafficRouting:
        plugins:
          argoproj-labs/gatewayAPI:
            httpRoute: argo-rollouts-test-httproute # our created httproute
            namespace: default
      steps:
      - setWeight: 30
      - pause: {}
      - setWeight: 60
      - pause: {}
      - setWeight: 100
      - pause: {} 
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: rollouts-demo
  template:
    metadata:
      labels:
        app: rollouts-demo
    spec:
      containers:
        - name: rollouts-demo
          image: kostiscodefresh/summer-of-k8s-app:v2 # change to v2 for next version
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          resources:
            requests:
              memory: 32Mi
              cpu: 5m

@Philipp-Plotnikov
Copy link
Collaborator

I created and it seems both routes work: one that work using argo rollouts and another without argo rollouts. Both uses the same gateway

@Philipp-Plotnikov
Copy link
Collaborator

Ah, I am using Kong of 3.6 version. I will try to downgrade and check will it work or not

@som-kanade-zepto
Copy link
Author

Yes @Philipp-Plotnikov It is similar routes like you mentioned
Can you please deploy something on one of the backend route which is hosting /api/v1/cart and run api test

@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto all works, but it needs to add / at ther end of the path so it works for
/test/ not /test
/api/v1/cart/ not /api/v1/cart

@Philipp-Plotnikov
Copy link
Collaborator

I follow this instruction to install kong
https://docs.konghq.com/kubernetes-ingress-controller/latest/install/helm/
After it needs to install argo rollouts with plugin and routes

@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto did you follow these instructions to install kong ? If not, can you try it, please ?

@som-kanade-zepto
Copy link
Author

Yes @Philipp-Plotnikov We did install

@Philipp-Plotnikov
Copy link
Collaborator

Philipp-Plotnikov commented Aug 13, 2024

@som-kanade-zepto as quick check can you upgrade kong and check will it work, please ? Maybe it was a bug in kong(not sure). As for now I dont have any suggestions, what is the reason of fails. For me it works. I created 2 HTTPRoutes, /test (for argo rollouts), /api/v1/cart (as seperate HTTPRoute). Both HTTPRoutes point to the same pods that were created with argo rollouts (kostiscodefresh/summer-of-k8s-app:v2). But I also created one more HTTPRoute (/single/test) that points to the different pods and it works too. All 3 HTTPRoutes work. If it wont help, will continue to think.

@Philipp-Plotnikov
Copy link
Collaborator

Yes @Philipp-Plotnikov We did install

Are you sure you installed following the instructions in the link higher ? As in README the links point to the old doc version.

@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto old API stopped to work when argo rollouts finishes canary ? Can it be so situation that old routes point to the old pods that were deleted during canary with rollout ? I started to get 5xx error codes when HTTPRoute(not connected with rollout) continue to point to the old pods but rollout already replaces them with new version.

@som-kanade-zepto
Copy link
Author

There was no rollout happend on the rollouts which were failing

@Philipp-Plotnikov
Copy link
Collaborator

@som-kanade-zepto have you tried to upgrade kong ?

@som-kanade-zepto
Copy link
Author

Yes we did try upgrading to kong 3.6 with no luck

@Philipp-Plotnikov
Copy link
Collaborator

Philipp-Plotnikov commented Sep 10, 2024

@som-kanade-zepto can you try new v0.4.0 release to check the same problem is or is not, please ?

@som-kanade-zepto
Copy link
Author

thanks @Philipp-Plotnikov will try and let you know about the findings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants