flagger. stefan... · 2020-01-14 · custom metric checks (prometheus queries) webhooks...

13
Flagger Service Mesh Progressive Delivery Operator Stefan Prodan @stefanprodan KubeCon Barcelona May 2019 1

Upload: others

Post on 25-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

FlaggerService Mesh Progressive Delivery Operator

Stefan Prodan @stefanprodan

KubeCon Barcelona May 2019

1

Page 2: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Introducing Flagger

Flagger is a Kubernetes operator that automates the promotion of canary deployments using App Mesh, Istio, Gloo or NGINX routing for traffic shifting and Prometheus metrics for canary analysis.

Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators. Based on the KPIs analysis a canary is promoted or aborted.

Page 3: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Flagger overview

Page 4: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Flagger Goals

● Give developers confidence in automating the production releases○ Have control over the blast radius (traffic management)○ Have control over the validation process (perf metrics)

● Make the deployment process observable ○ Real time feedback (Prometheus/Grafana)○ Alerting (Slack/Alertmanager/PagerDuty/etc)○ Emit Kubernetes events every time something changes

● Write as little YAML as possible● Manage the whole process from Git

Page 5: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Have control over the blast radius

Page 6: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Have control over the validation process

Flagger lets you define key performance indicators and thresholds. The decision to pause the traffic shift, abort or promote a canary is based on:

● Deployment health status● Request success rate percentage (Envoy metric)● Request latency average value (Envoy metric)● Custom metric checks (Prometheus queries)● Webhooks (integration testing, load testing, etc)

Page 7: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Make the deployment process observable

Flagger comes with a Grafana dashboard for canary analysis.

Page 8: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Make the deployment process observableFlagger emits Kubernetes events related to the advancement and final status of a canary analysis.

Page 9: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Make the deployment process observable

Flagger can be configured to publish the canary analysis result to Slack.

Page 10: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Write less YAML

Manual canary setup

Kubernetes objects

1. Canary Deployment2. Canary ClusterIP Service3. Canary Horizontal Pod Autoscaler4. Primary Deployment5. Primary ClusterIP Service6. Primary Horizontal Pod Autoscaler

App Mesh objects

1. Canary virtual node2. Primary virtual node3. HTTP routes4. Virtual router5. Virtual service

Automated canary setup

Kubernetes objects

1. Deployment2. Horizontal Pod Autoscaler

Flagger objects

1. Canary

Page 11: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

GitOps pipeline

Page 12: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

GitOps Progressive Delivery Demo

12

Page 13: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes

Links

13

Flagger Repohttps://github.com/weaveworks/flagger

Flagger Docshttps://docs.flagger.app