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

Add a separate rollback check endpoint #443

Closed
harrison-kim opened this issue Feb 15, 2020 · 4 comments
Closed

Add a separate rollback check endpoint #443

harrison-kim opened this issue Feb 15, 2020 · 4 comments
Labels
kind/enhancement Improvement request for an existing feature

Comments

@harrison-kim
Copy link

We currently have the following within our canary manifest:

      # The /gate/check endpoint returns 403 until /gate/open is called
      - name: "promotion gate"
        type: confirm-promotion
        url: http://flagger-loadtester.test/gate/check
      # Close the gate after rollout to block future deployments
      - name: "close gate"
        type: post-rollout
        url: http://flagger-loadtester.test/gate/close

This works out great for halting promotions and requiring manual approval within our pipelines!

However, rollbacks have been a bit more difficult. We wanted to have rollback follow a similar procedure without having to manually edit the manifest from /halt to an endpoint that returns a 200, as provided within the examples:

      - name: "rollback"
        type: rollback
        url: http://flagger-loadtester.test/gate/halt

Is it possible to create a separate /rollback/check, rollback/open, and rollback/close endpoint for this purpose? The current alternative is to spin up a second loadtester deployment (e.g. flagger-loadtester-rollback).

@stefanprodan stefanprodan added the kind/enhancement Improvement request for an existing feature label Feb 16, 2020
@ta924
Copy link
Contributor

ta924 commented Feb 17, 2020

@stefanprodan if you have recommendations on how you envision this approach working, I can submit a PR to handle rollback gating. I could think of a few options, the first to continue with the approach now for GateStorage and add RollbackStorage. Second, modify the GateStorage map to handle keys specifying specific gating approaches. Exposing the endpoints is the simple part, so the underlying storage seems to be the only real question to resolve.

@stefanprodan
Copy link
Member

@ta924 I would add rollback as a prefix to the GateStorage keys and create the /rollback/[check,open,close] routers.

@ta924
Copy link
Contributor

ta924 commented Feb 18, 2020

Thanks @stefanprodan for the feedback, I will get a PR out there.

@stefanprodan
Copy link
Member

Fixed by #449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvement request for an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants