argo-rollouts icon indicating copy to clipboard operation
argo-rollouts copied to clipboard

feat: Gateway API support. Fixes #1438

Open PhilippPlotnikov opened this issue 2 years ago • 16 comments

Checklist:

  • [x] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • [x] The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • [x] I've signed my commits with DCO
  • [x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • [x] My builds are green. Try syncing with master if they are not.
  • [x] My organization is added to USERS.md.

PhilippPlotnikov avatar Apr 27 '22 06:04 PhilippPlotnikov

Codecov Report

Base: 81.60% // Head: 82.40% // Increases project coverage by +0.79% :tada:

Coverage data is based on head (ab0a03d) compared to base (24c9621). Patch coverage: 84.56% of modified lines in pull request are covered.

:exclamation: Current head ab0a03d differs from pull request most recent head 584c2a5. Consider uploading reports for the commit 584c2a5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2004      +/-   ##
==========================================
+ Coverage   81.60%   82.40%   +0.79%     
==========================================
  Files         130      121       -9     
  Lines       19481    17541    -1940     
==========================================
- Hits        15898    14454    -1444     
+ Misses       2766     2368     -398     
+ Partials      817      719      -98     
Impacted Files Coverage Δ
utils/defaults/defaults.go 87.16% <0.00%> (-2.22%) :arrow_down:
rollout/trafficrouting/gatewayapi/gatewayapi.go 84.89% <84.89%> (ø)
rollout/trafficrouting.go 81.45% <100.00%> (+5.22%) :arrow_up:
utils/unstructured/unstructured.go 55.93% <0.00%> (-18.40%) :arrow_down:
ingress/ingress.go 60.60% <0.00%> (-13.40%) :arrow_down:
service/service.go 68.37% <0.00%> (-10.14%) :arrow_down:
analysis/controller.go 52.17% <0.00%> (-9.37%) :arrow_down:
pkg/kubectl-argo-rollouts/info/analysisrun_info.go 82.60% <0.00%> (-7.40%) :arrow_down:
experiments/controller.go 67.28% <0.00%> (-4.14%) :arrow_down:
utils/ingress/wrapper.go 89.25% <0.00%> (-3.08%) :arrow_down:
... and 62 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 27 '22 06:04 codecov[bot]

I will take a look at reviewing this soon.

zachaller avatar Apr 28 '22 15:04 zachaller

@PhilippPlotnikov , thanks for the contribution. To help the review the new feature, could you add some description to the doc: https://github.com/argoproj/argo-rollouts/blob/master/docs/features/traffic-management/index.md#how-does-argo-rollouts-enable-traffic-management

huikang avatar Apr 29 '22 15:04 huikang

Will this support Zuul Gateway ?

shuker85 avatar May 26 '22 07:05 shuker85

Hi @shuker85, can you drop me the link to the documentation of Zuul Gateway please ?

PhilippPlotnikov avatar May 26 '22 07:05 PhilippPlotnikov

@PhilippPlotnikov hi, i guess it's https://github.com/Netflix/zuul/wiki

shuker85 avatar May 26 '22 08:05 shuker85

@shuker85 am I right it is simple java application ? If yes, you can of course use this feature as Zuul Gateway will be pods simply. Create pods using ArgoRollouts and make all steps like in documentation if you use Traefik controller.(You only need set needing ports for you)

PhilippPlotnikov avatar May 26 '22 08:05 PhilippPlotnikov

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.5% 1.5% Duplication

sonarqubecloud[bot] avatar May 26 '22 17:05 sonarqubecloud[bot]

will wait for @zachaller review before merging it

harikrongali avatar Jun 03 '22 00:06 harikrongali

So I would like to talk about this a bit more based on this https://github.com/argoproj/argo-rollouts/issues/2073. I would like to make this a bit more gitops friendly using the new spec proposed in the issue. As well as a few changes to what is defined in this PR if we find a place to put the service ports argo rollouts would have all the information needed to create and manage the canary route without having to have the user define a route at all. My suggestion is putting the ports on the already existing fields listed below and adding some validation on requiring it for GatewayAPI because it is required for k8s services.

strategy:
    canary:
      canaryService: argo-rollouts-canary-service:<port>
      stableService: argo-rollouts-stable-service:<port>

If the second part of the proposal from the issue is also approved which gives us the ability to add this

      trafficRouting:
        managedRoutes:
          - name: primary-route
            canaryRoute: true #This becomes the default/canary route in the upstream traffic router

Then we do not even need the config below except for a way to let rollouts know what type of traffic router we are configuring which could be something like gatewayAPI: {} or gatewayAPI: {enabled: true} etc

trafficRouting:
  gatewayAPI:
    httpRoute: argo-rollouts-http-route # our created httproute

zachaller avatar Jun 03 '22 20:06 zachaller

So we talked about this a bit more and decided that putting the port into canaryService and stableService would not be a good idea because it breaks customise named references but dropping that config into per traffic router config would be a good approach.

trafficRouting:
  gatewayAPI:
    gateway:
      gatewayName: argo-rollouts-gateway
      ports:
        stableService: 80
        canaryService: 80

We also discussed a bit more about the new spec changes and we are liking where they are going but we will probably hold off on adding the part about canaryRoute: true into the 1.3 release so that will hold this up for that release. But will get that added to master shortly after.

zachaller avatar Jun 16 '22 13:06 zachaller

@zachaller hi. Am I right you would like to add in argo-rollouts feature to create canary-route, stable-route and traffic splitter(in this case gatewayService) with itself so user wont need to create these resources manually, right ?

PhilippPlotnikov avatar Jun 23 '22 16:06 PhilippPlotnikov

I didnt understand this

      trafficRouting:
        managedRoutes:
          - name: primary-route
            canaryRoute: true #This becomes the default/canary route in the upstream traffic router

I undertsood that we would like to add opportunity to set header rules or something like this and it can be overlapped but where and how and for what do we need canaryRoute ?

PhilippPlotnikov avatar Jun 23 '22 17:06 PhilippPlotnikov

Im not sure that I understood but it sounds like it needs big change maybe this can be pushed and after I will add another PR with needing update ? To not make this PR big

PhilippPlotnikov avatar Jun 23 '22 17:06 PhilippPlotnikov

Hello, are there any updates for this PR?

mrmm avatar Aug 15 '22 15:08 mrmm

Not much of an update but I will bring this up during community meetings and try to finalize the canaryRoute bit which will then allow this PR to get finished.

zachaller avatar Aug 30 '22 17:08 zachaller

Any news about this PR?

lucasarrudatrustly avatar Oct 12 '22 01:10 lucasarrudatrustly

Sorry guys, I had some problems, today I will try to resolve conflicts and finish this PR on next week

PhilippPlotnikov avatar Oct 21 '22 15:10 PhilippPlotnikov

E2E Tests Published Test Results

    2 files      2 suites   1h 35m 52s :stopwatch:   95 tests   92 :heavy_check_mark: 3 :zzz: 0 :x: 190 runs  184 :heavy_check_mark: 6 :zzz: 0 :x:

Results for commit 584c2a5a.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 21 '22 17:10 github-actions[bot]

Go Published Test Results

1 861 tests   1 852 :heavy_check_mark:  2m 32s :stopwatch:    114 suites         0 :zzz:        1 files           9 :x:

For more details on these failures, see this check.

Results for commit 584c2a5a.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 21 '22 17:10 github-actions[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.2% 3.2% Duplication

sonarqubecloud[bot] avatar Oct 21 '22 18:10 sonarqubecloud[bot]

Any news about this PR?

lucasarrudatrustly avatar Jan 09 '23 23:01 lucasarrudatrustly

any updates?

xkkker avatar Jan 11 '23 03:01 xkkker

Any progress on this?

jrake-revelant avatar Feb 06 '23 15:02 jrake-revelant

Flagger already have this #just_saying

rjanovski avatar Feb 07 '23 12:02 rjanovski

In v1.5 we will have support for a plugin system for traffic routers and metric providers this will allow people to create and maintain plugins quite easily. These plugins will be able to live under argoproj-labs an example plugin for metrics exists here https://github.com/argoproj-labs/sample-rollouts-metric-plugin we will then be able to link these to documatation within argo rollouts docs page.

zachaller avatar Feb 07 '23 16:02 zachaller

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.9% 4.9% Duplication

sonarqubecloud[bot] avatar Feb 08 '23 23:02 sonarqubecloud[bot]

I am making plugin for GatewayAPI here https://github.com/argoproj-labs/rollouts-gatewayapi-trafficrouter-plugin/pull/1 I hope anything wont be changed and I will soon push it and we will have support for GatewayAPI Now Im waiting when interface for communication with argo-rollouts will be changed to finish with unit tests and to test its work locally

PhilippPlotnikov avatar Feb 20 '23 20:02 PhilippPlotnikov

This PR is stale because it has been open 90 days with no activity.

github-actions[bot] avatar May 22 '23 02:05 github-actions[bot]

Closing as completed via plugin

zachaller avatar May 22 '23 16:05 zachaller