diff --git a/charts/flagger/Chart.yaml b/charts/flagger/Chart.yaml index a86cffdc..b724c6b0 100644 --- a/charts/flagger/Chart.yaml +++ b/charts/flagger/Chart.yaml @@ -1,6 +1,16 @@ apiVersion: v1 name: flagger version: 0.1.2 -appVersion: 0.1.2 +kubeVersion: ">=1.9.0-0" +engine: gotpl description: Flagger is a Kubernetes operator that automates the promotion of canary deployments using Istio routing for traffic shifting and Prometheus metrics for canary analysis. -home: https://github.com/stefanprodan/flagger +home: https://flagger.app +icon: https://raw.githubusercontent.com/stefanprodan/flagger/master/docs/logo/flagger-icon.png +sources: +- https://github.com/stefanprodan/flagger +maintainers: +- name: stefanprodan + url: https://github.com/stefanprodan +keywords: +- canary +- istio diff --git a/charts/flagger/README.md b/charts/flagger/README.md index dc1cdbf7..212693d5 100644 --- a/charts/flagger/README.md +++ b/charts/flagger/README.md @@ -1,11 +1,20 @@ # Flagger [Flagger](https://flagger.app) is a Kubernetes operator that automates the promotion of canary deployments -using Istio routing for traffic shifting and Prometheus metrics for canary analysis. +using Istio 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. + +## Prerequisites + +* Kubernetes >= 1.9 +* Istio >= 1.0 +* Prometheus >= 2.6 ## Installing the Chart -Add Flagger Hel repository: +Add Flagger Helm repository: ```console helm repo add flagger https://flagger.app diff --git a/charts/flagger/templates/_helpers.tpl b/charts/flagger/templates/_helpers.tpl index 89ab73d3..a37d87fc 100644 --- a/charts/flagger/templates/_helpers.tpl +++ b/charts/flagger/templates/_helpers.tpl @@ -1,4 +1,10 @@ -{{/* vim: set filetype=mustache: */}} +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "flagger.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{/* Expand the name of the chart. */}} @@ -25,8 +31,12 @@ If release name contains chart name it will be used as a full name. {{- end -}} {{/* -Create chart name and version as used by the chart label. +Create the name of the service account to use */}} -{{- define "flagger.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- define "flagger.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "flagger.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/flagger/templates/account.yaml b/charts/flagger/templates/account.yaml index ee2a7423..b314ec21 100644 --- a/charts/flagger/templates/account.yaml +++ b/charts/flagger/templates/account.yaml @@ -1,9 +1,11 @@ +{{- if .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "flagger.name" . }} + name: {{ template "flagger.serviceAccountName" . }} labels: - app: {{ template "flagger.name" . }} - chart: {{ template "flagger.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + helm.sh/chart: {{ template "flagger.chart" . }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/flagger/templates/deployment.yaml b/charts/flagger/templates/deployment.yaml index f35924bd..94ddd615 100644 --- a/charts/flagger/templates/deployment.yaml +++ b/charts/flagger/templates/deployment.yaml @@ -3,25 +3,25 @@ kind: Deployment metadata: name: {{ include "flagger.fullname" . }} labels: - app: {{ include "flagger.name" . }} - chart: {{ include "flagger.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + helm.sh/chart: {{ template "flagger.chart" . }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: - app: {{ include "flagger.name" . }} - release: {{ .Release.Name }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: - app: {{ include "flagger.name" . }} - release: {{ .Release.Name }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} spec: - serviceAccountName: flagger + serviceAccountName: {{ template "flagger.serviceAccountName" . }} containers: - name: flagger securityContext: diff --git a/charts/flagger/templates/rbac.yaml b/charts/flagger/templates/rbac.yaml index 2cd4da2a..6e44cef2 100644 --- a/charts/flagger/templates/rbac.yaml +++ b/charts/flagger/templates/rbac.yaml @@ -4,10 +4,10 @@ kind: ClusterRole metadata: name: {{ template "flagger.fullname" . }} labels: - app: {{ template "flagger.name" . }} - chart: {{ template "flagger.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + helm.sh/chart: {{ template "flagger.chart" . }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} rules: - apiGroups: ['*'] resources: ['*'] @@ -20,16 +20,16 @@ kind: ClusterRoleBinding metadata: name: {{ template "flagger.fullname" . }} labels: - app: {{ template "flagger.name" . }} - chart: {{ template "flagger.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + helm.sh/chart: {{ template "flagger.chart" . }} + app.kubernetes.io/name: {{ template "flagger.name" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: {{ template "flagger.fullname" . }} subjects: -- name: {{ template "flagger.name" . }} - namespace: {{ .Release.Namespace | quote }} +- name: {{ template "flagger.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} kind: ServiceAccount {{- end }} diff --git a/charts/flagger/values.yaml b/charts/flagger/values.yaml index c5b5b1b0..15a0b469 100644 --- a/charts/flagger/values.yaml +++ b/charts/flagger/values.yaml @@ -14,10 +14,18 @@ slack: # incoming webhook https://api.slack.com/incoming-webhooks url: -crd: +serviceAccount: + # serviceAccount.create: Whether to create a service account or not create: true + # serviceAccount.name: The name of the service account to create or use + name: "" rbac: + # rbac.create: `true` if rbac resources should be created + create: true + +crd: + # crd.create: `true` if custom resource definitions should be created create: true nameOverride: "" diff --git a/docs/logo/flagger-horiz.jpg b/docs/logo/flagger-horiz.jpg new file mode 100644 index 00000000..51621c50 Binary files /dev/null and b/docs/logo/flagger-horiz.jpg differ diff --git a/docs/logo/flagger-horiz.png b/docs/logo/flagger-horiz.png new file mode 100644 index 00000000..5c2bf780 Binary files /dev/null and b/docs/logo/flagger-horiz.png differ diff --git a/docs/logo/flagger-icon.jpg b/docs/logo/flagger-icon.jpg new file mode 100644 index 00000000..4c3f85f8 Binary files /dev/null and b/docs/logo/flagger-icon.jpg differ diff --git a/docs/logo/flagger-icon.png b/docs/logo/flagger-icon.png new file mode 100644 index 00000000..bae658d7 Binary files /dev/null and b/docs/logo/flagger-icon.png differ diff --git a/docs/logo/flagger-vert.jpg b/docs/logo/flagger-vert.jpg new file mode 100644 index 00000000..99335420 Binary files /dev/null and b/docs/logo/flagger-vert.jpg differ diff --git a/docs/logo/flagger-vert.png b/docs/logo/flagger-vert.png new file mode 100644 index 00000000..3dbdbf4d Binary files /dev/null and b/docs/logo/flagger-vert.png differ diff --git a/docs/logo/icon.png b/docs/logo/icon.png deleted file mode 100644 index 0bd033e8..00000000 Binary files a/docs/logo/icon.png and /dev/null differ diff --git a/docs/logo/icon.svg b/docs/logo/icon.svg deleted file mode 100644 index 7fb3b681..00000000 --- a/docs/logo/icon.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - istio-refresh - Created with Sketch. - - - - - \ No newline at end of file