Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kustomize installer #232

Merged
merged 8 commits into from
Jul 5, 2019
Merged

Add Kustomize installer #232

merged 8 commits into from
Jul 5, 2019

Conversation

stefanprodan
Copy link
Member

As an alternative to Helm, Flagger can be installed with Kustomize. Fix: #172

Service mesh specific installers

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.

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.

Generic installer

Install Flagger and Prometheus:

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:

apiVersion: flagger.app/v1alpha3
kind: Canary
metadata:
  name: app
  namespace: test
spec:
  # can be: kubernetes, istio, appmesh, linkerd, smi, nginx, gloo, supergloo
  # use the kubernetes provider for Blue/Green style deployments
  provider: nginx

Customized installer

Create a kustomization file using flagger as base:

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:

cat > patch.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flagger
spec:
  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:

kubectl apply -k .

@stefanprodan stefanprodan merged commit 514e850 into master Jul 5, 2019
@stefanprodan stefanprodan deleted the kustomize branch July 5, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Kustomize to install flagger
1 participant