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 support for nginx ingress controller #170

Merged
merged 10 commits into from
May 8, 2019
Merged

Add support for nginx ingress controller #170

merged 10 commits into from
May 8, 2019

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented May 6, 2019

This PR adds support for nginx ingress controller canary deployments.

How to test this:

Clone this repo and checkout the nginx branch:

git clone https://github.com/weaveworks/flagger
cd flagger
git checkout nginx

Install the nginx ingress controller with Helm:

helm upgrade -i nginx stable/nginx-ingress \
--namespace ingress-nginx \
--set controller.stats.enabled=true \
--set controller.metrics.enabled=true

Install Prometheus:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/monitoring/configuration.yaml

kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/monitoring/prometheus.yaml

Install Flagger with nginx support:

helm repo add flagger https://flagger.app

helm upgrade -i flagger flagger/flagger \
--namespace ingress-nginx \
--set metricsServer=http://prometheus-server:9090 \
--set meshProvider=nginx \
--set image.tag=nginx-a233b99

Install the load tester:

helm upgrade -i flagger-loadtester flagger/loadtester \
--namespace test

Edit ./artifacts/nginx/ingress and ./artifacts/nginx/canary and replace app.example.com with your own domain.

Deploy the podinfo in the test namespace:

kubectl apply -f ./artifacts/nginx

Check initialisation:

 kubectl get canaries --all-namespaces

Trigger canary deployment:

kubectl -n test set image deployment/podinfo \
podinfod=quay.io/stefanprodan/podinfo:1.4.1

Check deployment:

watch kubectl -n test describe canary/podinfo

Generate 500 errors:

hey -z 2m -c 5 -q 5 http://app.example.com/status/500

Trigger canary deployment:

kubectl -n test set image deployment/podinfo \
podinfod=quay.io/stefanprodan/podinfo:1.4.2

Verify rollback:

kubectl -n ingress-nginx logs deploy/flagger -f | jq .msg

Fix: #169

@stefanprodan stefanprodan changed the title [WIP] Add support for nginx ingress controller Add support for nginx ingress controller May 8, 2019
@stefanprodan stefanprodan merged commit 948df55 into master May 8, 2019
@stefanprodan stefanprodan deleted the nginx branch May 8, 2019 14:44
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.

Feature to Support for Nginx Ingress Canary
1 participant