mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Add kubectl min version to Kustomize docs
This commit is contained in:
@@ -135,6 +135,7 @@ 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.
|
||||
Note that you'll need kubectl 1.14 or newer that comes with the Kustomize commands.
|
||||
|
||||
**Service mesh specific installers**
|
||||
|
||||
@@ -144,7 +145,7 @@ Install Flagger for Istio:
|
||||
kubectl apply -k github.com/weaveworks/flagger/kustomize/istio
|
||||
```
|
||||
|
||||
This deploys Flagger in the `istio-system` namespace and sets the metrics server URL to `http://prometheus.istio-system:9090`.
|
||||
This deploys Flagger in the `istio-system` namespace and sets the metrics server URL to Istio's Prometheus instance.
|
||||
|
||||
Install Flagger for Linkerd:
|
||||
|
||||
@@ -152,7 +153,7 @@ Install Flagger for Linkerd:
|
||||
kubectl apply -k github.com/weaveworks/flagger/kustomize/linkerd
|
||||
```
|
||||
|
||||
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to `http://linkerd-prometheus.linkerd:9090`.
|
||||
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to Linkerd's Prometheus instance.
|
||||
|
||||
**Generic installer**
|
||||
|
||||
@@ -168,7 +169,7 @@ sets the metrics server URL to `http://flagger-prometheus.flagger-system:9090` a
|
||||
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.
|
||||
|
||||
To target a specific provider you need to specify it in the canary custom resource:
|
||||
To target a different provider you can specify it in the canary custom resource:
|
||||
|
||||
```yaml
|
||||
apiVersion: flagger.app/v1alpha3
|
||||
@@ -223,3 +224,5 @@ Install Flagger with Slack:
|
||||
```bash
|
||||
kubectl apply -k .
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
+51
-8
@@ -1,13 +1,14 @@
|
||||
# Flagger Kustomize installer
|
||||
|
||||
As an alternative to Helm, Flagger can be installed with Kustomize.
|
||||
As an alternative to Helm, Flagger can be installed with [Kustomize](https://kustomize.io/).
|
||||
Note that you'll need kubectl 1.14 or newer that comes with the Kustomize commands.
|
||||
|
||||
## Service mesh specific installers
|
||||
|
||||
Install Flagger for Istio:
|
||||
|
||||
```bash
|
||||
kubectl apply -k github.com/weaveworks/flagger/kustomize/istio
|
||||
kubectl apply -k github.com/weaveworks/flagger//kustomize/istio
|
||||
```
|
||||
|
||||
This deploys Flagger in the `istio-system` namespace and sets the metrics server URL to `http://prometheus.istio-system:9090`.
|
||||
@@ -15,7 +16,7 @@ This deploys Flagger in the `istio-system` namespace and sets the metrics server
|
||||
Install Flagger for Linkerd:
|
||||
|
||||
```bash
|
||||
kubectl apply -k github.com/weaveworks/flagger/kustomize/linkerd
|
||||
kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd
|
||||
```
|
||||
|
||||
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to `http://linkerd-prometheus.linkerd:9090`.
|
||||
@@ -25,13 +26,16 @@ This deploys Flagger in the `linkerd` namespace and sets the metrics server URL
|
||||
Install Flagger and Prometheus:
|
||||
|
||||
```bash
|
||||
kubectl apply -k github.com/weaveworks/flagger/kustomize/kubernetes
|
||||
kubectl apply -k github.com/weaveworks/flagger//kustomize/kubernetes
|
||||
```
|
||||
|
||||
This deploys Flagger and Prometheus in the `flagger-system` namespace,
|
||||
sets the metrics server URL to `http://flagger-prometheus.flagger-system:9090` and the mesh provider to `kubernetes`.
|
||||
|
||||
To target a specific provider you need to specify it in the canary custom resource:
|
||||
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.
|
||||
|
||||
To target a different provider you can specify it in the canary custom resource:
|
||||
|
||||
```yaml
|
||||
apiVersion: flagger.app/v1alpha3
|
||||
@@ -40,12 +44,12 @@ metadata:
|
||||
name: app
|
||||
namespace: test
|
||||
spec:
|
||||
# can be: kubernetes, istio, appmesh, linkerd, smi, nginx, gloo, supergloo
|
||||
# can be: kubernetes, appmesh, nginx, gloo
|
||||
# use the kubernetes provider for Blue/Green style deployments
|
||||
provider: nginx
|
||||
```
|
||||
|
||||
## Customized installer
|
||||
## Configure Slack notifications
|
||||
|
||||
Create a kustomization file using flagger as base:
|
||||
|
||||
@@ -81,9 +85,48 @@ spec:
|
||||
EOF
|
||||
```
|
||||
|
||||
Install Flagger with Slack:
|
||||
Install Flagger for Istio with Slack notifications:
|
||||
|
||||
```bash
|
||||
kubectl apply -k .
|
||||
```
|
||||
|
||||
## 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 .
|
||||
```
|
||||
Reference in New Issue
Block a user