Let’s say we want to deploy our new release only to 20% of the users and that we will monitor metrics for 60 seconds. During that period, we’ll be validating whether the error rate is within a predefined threshold and whether the time it takes to process requests is within some limits. If everything seems right, we’ll increase the percentage of users who can use our new release for another 20%, and continue monitoring metrics to decide whether to proceed. The process should repeat until the new release is rolled out to everyone, twenty percent at a time every thirty seconds.

Now that we have a general idea of what we want to accomplish and that all the tools are set up, all that’s missing is to create Flagger Canary definition.

Fortunately, canary deployments with Flagger are available in Jenkins X build packs since January 2020. So, there’s not much work to do to convert our application to use the canary deployment process.

The Canary resource definition #

Let’s take a look at the Canary resource definition already available in our project.

Get hands-on with 1200+ tech skills courses.