flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Support virtualservice and destinationrule settings to be configurable by name

Open S-mishina opened this issue 1 year ago • 2 comments

Describe the feature

Currently, when using a flagger-generated destination rule to set the circuit breaker, only the circuit breaker value for the entire service can be set.

Proposed solution

We would like to be able to use the virtual service and destination rules generated by Flagger to determine the line blocking thresholds for each client. Specifically, we would like to be able to set the following.

  • virtualservice
  http:
  - name: hoge1
    match:
    - sourceLabels:
        test-flg: true
    route:
      - destination:
          host: hoge-api-primary
          subset: hogehoge
        weight: 100
      - destination:
          host: hoge-api-canary
          subset: hogehoge
        weight: 0
      timeout: 10s
  - name: hoge2
    route:
      - destination:
          host: hoge-api-primary
          subset: hogehoge1
        weight: 100
      - destination:
          host: hoge-api-canary
          subset: hogehoge1
        weight: 0
      timeout: 10s
  • destination rule
  subsets:
  - name: hogehoge
    trafficPolicy:
      outlierDetection:
        consecutive5xxErrors: 360
        interval: 3m
        baseEjectionTime: 30s
        maxEjectionPercent: 100
  - name: hogehoge1

Any alternatives you've considered?

This is not an alternative, but I would be happy to discuss the following matter.

  • Can we implement a circuit breaker value for each subset?
  • If possible, I would be happy to discuss how best to implement this.
    • I have created and implemented a tentative implementation of canary.spec.service.httpname!
      • -> https://github.com/fluxcd/flagger/pull/1433

S-mishina avatar Aug 21 '23 09:08 S-mishina

To put it plainly, we want to manage virtualservice and destination rule by name.

I'd be glad to know if there is any other way other than the suggested method.

S-mishina avatar Oct 17 '23 13:10 S-mishina

@aryan9600 Thanks for reviewing PR the other day. Can I have a look at this issue?

-- In addition to what I wrote in the issue, I feel that if you can't set virtual service and destination rules for each NAME, you can't set timeouts for each PATH, etc.

I hope that you will take a look at this issue and we can solve the problem together!

S-mishina avatar Oct 31 '23 11:10 S-mishina