Flagger

Definition

Flagger is a progressive delivery tool for Kubernetes that automates the release process for applications by managing canary deployments, A/B testing, and blue/green deployments. It integrates with service meshes and ingress controllers to gradually shift traffic to new versions of applications, ensuring stability and minimizing downtime. Flagger continuously monitors application metrics and can automatically roll back changes if issues are detected.

Secure Settings Example

apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
  name: podinfo
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: podinfo
  service:
    port: 9898
    targetPort: 9898
  analysis:
    interval: 1m
    threshold: 10
    metrics:
      - name: request-success-rate
        threshold: 99
        interval: 1m
    webhooks:
      - name: load-test
        type: pre-rollout
        url: http://flagger-loadtester.test/
        timeout: 5s
        metadata:
          type: cmd
          cmd: "curl -sd 'test' http://podinfo-canary:9898/"

Insecure Settings Example

apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
  name: podinfo
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: podinfo
  service:
    port: 9898
    targetPort: 9898
  analysis:
    interval: 10s
    threshold: 1
    metrics:
      - name: request-success-rate
        threshold: 50
        interval: 10s
    webhooks:
      - name: load-test
        type: pre-rollout
        url: http://flagger-loadtester.test/
        timeout: 1s
        metadata:
          type: cmd
          cmd: "curl -sd 'test' http://podinfo-canary:9898/"