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 Ingress only update the first backend per rule #629

Closed
rafaelgaspar opened this issue Jun 19, 2020 · 2 comments · Fixed by #632
Closed

Canary Ingress only update the first backend per rule #629

rafaelgaspar opened this issue Jun 19, 2020 · 2 comments · Fixed by #632
Labels
kind/bug Something isn't working

Comments

@rafaelgaspar
Copy link
Contributor

rafaelgaspar commented Jun 19, 2020

Flagger version: 1.0.0 revision 682a1bf
Flagger CRD version: v1beta1
Kubernetes version: v1.16.8-eks-e16311
Mesh Provider: nginx

Hi,

I have an ingress resource that has 2 rules with the second rule having 3 paths, all of them pointing to the apex service.

The related canary ingress is properly created, but only the backend of the first rule, and the backend of first path of the second rule is properly updated to point to the canary service.

Follows the spec for the apex ingress:

spec:
  rules:
    - host: ui.my.service.com
      http:
        paths:
          - path: /path0/
            backend:
              serviceName: my-service
              servicePort: http
    - http:
        paths:
          - path: /path1/
            backend:
              serviceName: my-service
              servicePort: http
          - path: /path2/
            backend:
              serviceName: my-service
              servicePort: http
          - path: /path3/
            backend:
              serviceName: my-service
              servicePort: http

And the canary ingress:

spec:
  rules:
    - host: ui.my.service.com
      http:
        paths:
          - path: /path0/
            backend:
              serviceName: my-service-canary
              servicePort: http
    - http:
        paths:
          - path: /path1/
            backend:
              serviceName: my-service-canary
              servicePort: http
          - path: /path2/
            backend:
              serviceName: my-service
              servicePort: http
          - path: /path3/
            backend:
              serviceName: my-service
              servicePort: http
@rafaelgaspar
Copy link
Contributor Author

rafaelgaspar commented Jun 19, 2020

I'm not very fluent in go, but it looks like the break here is the cause of the bug.

https://github.com/weaveworks/flagger/blob/1a6593727871f1b5af19158c9eb41fe98d005316/pkg/router/ingress.go#L43-L52

Was there a reason for the break other than performance implications?

@stefanprodan
Copy link
Member

@rafaelgaspar my assumption was that there is a single backend. Would you mind opening a PR and remove the break? It should fix the bug.

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

Successfully merging a pull request may close this issue.

2 participants