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 with Flagger #78

Merged
merged 12 commits into from
Jan 3, 2020
Merged

Canary with Flagger #78

merged 12 commits into from
Jan 3, 2020

Conversation

vfarcic
Copy link
Contributor

@vfarcic vfarcic commented Jan 3, 2020

This PR adds the support for canary deployments with Flagger and Istio to the Go build pack. If accepted, I can make a separate PR with the same set of additions to other build packs. All the changes are inside if statements so merging this PR will not affect users unless they change the canary.enabled value to true. I also used this opportunity to add the support for HPA (also not used without changing.

This PR is useful by itself. Nevertheless, there are some pending tasks that could be done in separate PRs.

  1. Update the docs, write an article, record a video, or create some other way to explain how canary deployments work.
  2. Apply the same set of changes to other packs.
  3. Create a mechanism to auto-configure Istio Gateway in a similar way as today we're auto-configuring nginx Ingress.
  4. Fail the environment pipeline if canary deployment fails.
  5. If canary deployment fails, update the environment repo to reflect the change done by Flagger rolling back to the previous release.
  6. Prevent pipelines from running in parallel as a way to prevent overlapping canary deployments.

If this PR is merged, I can come back with PRs for 1) and 2) fairly quickly.

Viktor Farcic added 12 commits January 3, 2020 01:40
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
Signed-off-by: Viktor Farcic <[email protected]>
@jstrachan
Copy link
Contributor

for 6. we could use something like this idea jenkins-x/jx#5471

@jstrachan
Copy link
Contributor

@vfarcic this is awesome - well played!

Minor knit - we maybe want to make the canary provider istio configurable via the values.yaml so folks could try linkerd/gloo too?

@jstrachan
Copy link
Contributor

we can look at supporting gloo/linkerd too later on though; lets not slow down this change happening

@jstrachan
Copy link
Contributor

/lgtm

@jstrachan jstrachan merged commit 6bd30e4 into jenkins-x-buildpacks:master Jan 3, 2020
This was referenced Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants