flagger
Flagger is a Kubernetes operator that automates the promotion of canary deployments using Istio, Linkerd, App Mesh, Gloo or NGINX routing for traffic shifting and Prometheus metrics for canary analysis.
About this chart
Flagger
Flagger is a Kubernetes operator that automates the promotion of canary deployments using Istio, Linkerd, App Mesh, NGINX or Gloo 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 like HTTP requests success rate, requests average duration and pods health. Based on the KPIs analysis a canary is promoted or aborted and the analysis result is published to Slack or MS Teams.
Prerequisites
- Kubernetes >= 1.11
- Prometheus >= 2.6
Installing the Chart
Add Flagger Helm repository:
$ helm repo add flagger https://flagger.app
Install Flagger's custom resource definitions:
$ kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
To install the chart with the release name flagger for Istio:
$ helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set crd.create=false \
--set meshProvider=istio \
--set metricsServer=http://prometheus:9090
To install the chart with the release name flagger for Linkerd:
$ helm upgrade -i flagger flagger/flagger \
--namespace=linkerd \
--set crd.create=false \
--set meshProvider=linkerd \
--set metricsServer=http://linkerd-prometheus:9090
The configuration section lists the parameters that can be configured during installation.
Uninstalling the Chart
To uninstall/delete the flagger deployment:
$ helm delete --purge flagger
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following tables lists the configurable parameters of the Flagger chart and their default values.
| Parameter | Description | Default |
|---|---|---|
image.repository | image repository | weaveworks/flagger |
image.tag | image tag | <VERSION> |
image.pullPolicy | image pull policy | IfNotPresent |
podLabels | additional labels for Flagger pods | {} |
prometheus.install | if true, installs Prometheus configured to scrape all pods in the custer including the App Mesh sidecar | false |
metricsServer | Prometheus URL, used when prometheus.install is false | http://prometheus.istio-system:9090 |
slack.url | Slack incoming webhook | None |
slack.channel | Slack channel | None |
slack.user | Slack username | flagger |
msteams.url | Microsoft Teams incoming webhook | None |
leaderElection.enabled | leader election must be enabled when running more than one replica | false |
leaderElection.replicaCount | number of replicas | 1 |
ingressAnnotationsPrefix | annotations prefix for ingresses | custom.ingress.kubernetes.io |
rbac.create | if true, create and use RBAC resources | true |
rbac.pspEnabled | If true, create and use a restricted pod security policy | false |
crd.create | if true, create Flagger's CRDs | true |
resources.requests/cpu | pod CPU request | 10m |
resources.requests/memory | pod memory request | 32Mi |
resources.limits/cpu | pod CPU limit | 1000m |
resources.limits/memory | pod memory limit | 512Mi |
affinity | node/pod affinities | None |
nodeSelector | node labels for pod assignment | {} |
tolerations | list of node taints to tolerate | [] |
Specify each parameter using the --set key=value[,key=value] argument to helm upgrade. For example,
$ helm upgrade -i flagger flagger/flagger \
--namespace istio-system \
--set crd.create=false \
--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--set slack.channel=general
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
$ helm upgrade -i flagger flagger/flagger \
--namespace istio-system \
-f values.yaml
Tip: You can use the default values.yaml
Deploy flagger with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has flagger on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartflagger is pinned at v0.21.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply