docs: Update install docs for Kustomize 3.5.0

This commit is contained in:
stefanprodan
2020-03-23 12:03:28 +02:00
parent 41af740798
commit 683bc0b5ff
2 changed files with 63 additions and 121 deletions
@@ -4,7 +4,7 @@ This guide walks you through setting up Flagger on a Kubernetes cluster with Hel
## Prerequisites
Flagger requires a Kubernetes cluster **v1.11** or newer.
Flagger requires a Kubernetes cluster **v1.13** or newer.
## Install Flagger with Helm
@@ -164,21 +164,12 @@ kubectl -n istio-system port-forward svc/flagger-grafana 3000:80
## Install Flagger with Kustomize
As an alternative to Helm, Flagger can be installed with Kustomize.
As an alternative to Helm, Flagger can be installed with Kustomize **3.5.0** or newer.
**Service mesh specific installers**
Install Flagger for Istio:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/istio
```
This deploys Flagger in the `istio-system` namespace and sets the metrics server URL to Istio's Prometheus instance.
Note that you'll need kubectl 1.14 to run the above the command or you can download
the [kustomize binary](https://github.com/kubernetes-sigs/kustomize/releases) and run:
```bash
kustomize build github.com/weaveworks/flagger//kustomize/istio | kubectl apply -f -
```
@@ -186,7 +177,7 @@ kustomize build github.com/weaveworks/flagger//kustomize/istio | kubectl apply -
Install Flagger for AWS App Mesh:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/appmesh
kustomize build github.com/weaveworks/flagger//kustomize/appmesh | kubectl apply -f -
```
This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus instance.
@@ -194,7 +185,7 @@ This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus in
Install Flagger for Linkerd:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd
kustomize build github.com/weaveworks/flagger//kustomize/linkerd | kubectl apply -f -
```
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to Linkerd's Prometheus instance.
@@ -202,15 +193,15 @@ This deploys Flagger in the `linkerd` namespace and sets the metrics server URL
If you want to install a specific Flagger release, add the version number to the URL:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd?ref=0.18.0
kustomize build github.com/weaveworks/flagger//kustomize/linkerd?ref=0.18.0 | kubectl apply -f -
```
**Generic installer**
Install Flagger and Prometheus:
Install Flagger and Prometheus for Contour, Gloo or NGINX ingress:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/kubernetes
kustomize build github.com/weaveworks/flagger//kustomize/kubernetes | kubectl apply -f -
```
This deploys Flagger and Prometheus in the `flagger-system` namespace, sets the metrics server URL
@@ -235,46 +226,43 @@ spec:
**Customized installer**
Create a kustomization file using flagger as base:
Create a kustomization file using Flagger as base and patch the container args:
```bash
cat > kustomization.yaml <<EOF
namespace: istio-system
bases:
- github.com/weaveworks/flagger/kustomize/base/flagger
patchesStrategicMerge:
- patch.yaml
EOF
```
Create a patch and enable Slack notifications by setting the slack channel and hook URL:
```bash
cat > patch.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
template:
patches:
- target:
kind: Deployment
name: flagger
patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
containers:
- name: flagger
args:
- -mesh-provider=istio
- -metrics-server=http://prometheus.istio-system:9090
- -slack-user=flagger
- -slack-channel=alerts
- -slack-url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
template:
spec:
containers:
- name: flagger
args:
- -mesh-provider=istio
- -metrics-server=http://prometheus.istio-system:9090
- -slack-user=flagger
- -slack-channel=alerts
- -slack-url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
EOF
```
Install Flagger with Slack:
Install Flagger for Istio with Slack notifications:
```bash
kubectl apply -k .
kustomize build . | kubectl apply -f -
```
If you want to use MS Teams instead of Slack, replace `-slack-url` with `-msteams-url` and set the webhook address
to `https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK`.
+33 -79
View File
@@ -2,27 +2,25 @@
As an alternative to Helm, Flagger can be installed with [Kustomize](https://kustomize.io/).
**Prerequisites**
- Kubernetes cluster **>=1.13.0**
- Kustomize **>=3.5.0**
## Service mesh specific installers
Install Flagger for Istio:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/istio
kustomize build github.com/weaveworks/flagger//kustomize/istio | kubectl apply -f -
```
This deploys Flagger in the `istio-system` namespace and sets the metrics server URL to Istio's Prometheus instance.
Note that you'll need kubectl 1.14 to run the above the command or you can download the
[kustomize binary](https://github.com/kubernetes-sigs/kustomize/releases) and run:
```bash
kustomize build github.com/weaveworks/flagger//kustomize/istio | kubectl apply -f -
```
Install Flagger for AWS App Mesh:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/appmesh
kustomize build github.com/weaveworks/flagger//kustomize/appmesh | kubectl apply -f -
```
This deploys Flagger in the `appmesh-system` namespace and sets the metrics server URL to App Mesh Prometheus instance.
@@ -30,7 +28,7 @@ This deploys Flagger in the `appmesh-system` namespace and sets the metrics serv
Install Flagger for Linkerd:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd
kustomize build github.com/weaveworks/flagger//kustomize/linkerd | kubectl apply -f -
```
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to Linkerd's Prometheus instance.
@@ -38,13 +36,13 @@ This deploys Flagger in the `linkerd` namespace and sets the metrics server URL
If you want to install a specific Flagger release, add the version number to the URL:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd?ref=0.18.0
kustomize build github.com/weaveworks/flagger//kustomize/linkerd?ref=0.18.0 | kubectl apply -f -
```
Install Flagger for Contour:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/contour
kustomize build github.com/weaveworks/flagger//kustomize/contour | kubectl apply -f -
```
This deploys Flagger and Prometheus in the `projectcontour` namespace and sets Prometheus to scrape Contour's Envoy instances.
@@ -54,7 +52,7 @@ This deploys Flagger and Prometheus in the `projectcontour` namespace and sets P
Install Flagger and Prometheus:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/kubernetes
kustomize build github.com/weaveworks/flagger//kustomize/kubernetes | kubectl apply -f -
```
This deploys Flagger and Prometheus in the `flagger-system` namespace,
@@ -78,84 +76,40 @@ You'll need Prometheus when using Flagger with AWS App Mesh, Gloo or NGINX ingre
The Prometheus instance has a two hours data retention and is configured to scrape all pods in your cluster that
have the `prometheus.io/scrape: "true"` annotation.
## Configure Slack notifications
## Customise the installation
Create a kustomization file using flagger as base:
Create a kustomization file using Flagger as base and patch the container args:
```bash
cat > kustomization.yaml <<EOF
namespace: istio-system
bases:
- github.com/weaveworks/flagger/kustomize/base/flagger
patchesStrategicMerge:
- patch.yaml
EOF
```
Create a patch and enable Slack notifications by setting the slack channel and hook URL:
```bash
cat > patch.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
template:
patches:
- target:
kind: Deployment
name: flagger
patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
containers:
- name: flagger
args:
- -mesh-provider=istio
- -metrics-server=http://prometheus.istio-system:9090
- -slack-user=flagger
- -slack-channel=alerts
- -slack-url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
template:
spec:
containers:
- name: flagger
args:
- -mesh-provider=istio
- -metrics-server=http://prometheus.istio-system:9090
- -slack-user=flagger
- -slack-channel=alerts
- -slack-url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
EOF
```
Install Flagger for Istio with Slack notifications:
```bash
kubectl apply -k .
kustomize build . | kubectl apply -f -
```
## Configure MS Teams notifications
Create a kustomization file using flagger as base:
```bash
cat > kustomization.yaml <<EOF
namespace: linkerd
bases:
- github.com/weaveworks/flagger/kustomize/base/flagger
patchesStrategicMerge:
- patch.yaml
EOF
```
Create a patch and set the MS Teams webhook URL:
```bash
cat > patch.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
template:
spec:
containers:
- name: flagger
args:
- -mesh-provider=linkerd
- -metrics-server=http://linkerd-prometheus:9090
- -msteams-url=https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK
EOF
```
Install Flagger for Linkerd with MS Teams notifications:
```bash
kubectl apply -k .
```