Flagger's Top 4 Unique Features That Enable Progressive Delivery
Flagger is a simple automation and control solution for advanced deployments to Kubernetes. It was designed to give developers confidence in automating production releases with progressive delivery techniques. This article discusses the core features that make it a powerful option for implementing progressive delivery.
How to use GitOps and Progressive Delivery with Flux, Flagger, & Istio
Automating Kubeflow Pipelines with GitOps, GitHub Actions and Weave Flagger
Reduce Continuous Deployment Complexity with Flagger and Istio
For as long as we can recall, CI/CD has been at the center stage of DevOps and it has served well to improve deployment velocity and quality of code being shipped. Nonetheless, the demands of modern cloud-native applications require the adoption of GitOps to make the deployment process more Git-centric, and at the same time, leveraging approaches like progressive delivery to deploy with greater confidence. In this post, we discuss Flagger’s approach to progressive delivery, its key features and how they are responsible for advancing progressive delivery.
The practice of progressive delivery is essential to organizations trying to control how and when new software features and updates are delivered. It enables a variety of practices such as canarying, A/B testing, feature flags, and blue/green deployments, and offers a transformative approach to application delivery.
Flagger is a progressive delivery operator responsible for automating the release process for applications running on Kubernetes. While its merits are numerous, going by broad strokes, Flagger reduces the risk of introducing bad code into production as it gradually shifts traffic to the new version of a release only after it sees that the new version is reliable.
Flagger's Top 4 Features
Flagger integrates a GitOps agent like Weave GitOps (which features a great UI extension to Flux) with a service mesh tool like Istio or Linkerd, or an ingress controller like NGINX or Contour. It can also send monitoring data to Prometheus, Datadog, and Dynatrace among others and alert the developers through collaboration tools such as Microsoft Teams, Slack, and Google Chat.
Here is a list of 4 features that make Flagger the best progressive delivery operator for Kubernetes.
Progressive Delivery - Precision and Control with Weave GitOps
Experience progressive deployment strategies for Kubernetes application across multiple clusters and infrastructures with Weave GitOps.Learn More
1. Flexible Traffic Routing
Routing traffic between app versions is a critical component of modern progressive delivery practices that require new features to be rolled out gradually to limit the negative impact on the newly introduced updates.
Flagger helps manage traffic routing between the current and the new release. It can shift and route traffic between different app versions via a service mesh such as Istio, Linkerd, AWS App Mesh, Kuma, or OSM. And if a service mesh is overkill for your system, you can use an Ingress controller such as NGINX, Skipper, Traefik, Contour, or Gloo.
Furthermore, Flagger monitors the traffic routing for the canary release and decides whether to increase the traffic to the new release or not at each step. For instance, we can configure Flagger to query all the response code that is routed toward the canary release service and route a certain percentage of the traffic every few minutes to the new release. Flagger continually tests the traffic and routes more traffic to the new version as configured in the canary release.
2. Monitor Canary Deployments
Grafana provides advanced metric visualization and alerting and with Flagger, it allows the user to observe the canary deployment process. So, Flagger offers a Grafana dashboard out of the box for monitoring all canary deployments inside your cluster. Grafana can be easily installed with a single command with Helm (assuming Istio is already installed) and soon enough, the Flagger Grafana pod gets up and running.
All the canary errors and latency spikes get recorded as Kubernetes events and logged by Flagger in json format. Furthermore, Flagger exposes Prometheus metrics that can be used for determining the canary analysis status as well as the destination weight values.
3. Extensible Validation
In a canary release, the end-user that’s been chosen to receive the new version of the application helps provide early warnings if something is misaligned so that it can be reversed quickly. Soon after, the size of the audience is increased once the DevOps team gains more confidence with regard to the stability and reliability of the system. But validating deployments is at best a semi-automated process for most software delivery teams. It can take days, and in some cases even weeks to validate the quality of a deployment.
In the case of Flagger, apart from built-in metric checks, it helps extend a canary analysis through custom metrics and webhooks for running load tests, acceptance tests, or any other custom validation. This way, you can eliminate many forms of manual checks during progressive delivery and let Flagger validate the quality of releases automatically.
Flagger also includes a load generation tool that comes in handy to ensure that the canary version of an application has enough traffic to generate metrics for analysis. Flagger can then decide whether to continue the rollout. These finer details are what make Flagger the leading progressive delivery tool available today.
4. Automated GitOps Pipelines
As a key part of the broader suite of tools in Weave GitOps, Flagger enables you to build fully automated GitOps pipelines for Canary deployments. You can connect your Git repo where any altered Helm charts and manifests are automatically synced by Flagger.
For all of it to work, we need the Istio service mesh, Prometheus monitoring system, Flux GitOps operator, and Helm package manager working together with Flagger. The role of Flagger here is to automate the promotion of canary deployments using tools like Istio for traffic routing and Prometheus metrics for canary analysis. The best part is that all these tools are integrated into a single solution with Weave GitOps.
As a progressive delivery tool, Flagger transforms the release process for applications using Kubernetes to automate operations. It alleviates the risk of a bad software version in production by moving traffic to a healthy version as it continually runs conformance tests, and checks pre-defined metrics. While we have covered its key features in this post, you can find out more about Flagger here.