{"id":20975177,"url":"https://github.com/jhandguy/canary-deployment","last_synced_at":"2025-05-14T14:30:28.509Z","repository":{"id":50465885,"uuid":"442738396","full_name":"jhandguy/canary-deployment","owner":"jhandguy","description":"A sample project showcasing various Canary Deployment solutions.","archived":false,"fork":false,"pushed_at":"2024-10-30T09:47:13.000Z","size":88,"stargazers_count":8,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T10:28:15.350Z","etag":null,"topics":["argo-rollouts","canary-deployment","helm","ingress-nginx","k6","kind","kubernetes","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhandguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-29T10:32:14.000Z","updated_at":"2024-09-20T11:59:21.000Z","dependencies_parsed_at":"2023-11-30T15:31:13.098Z","dependency_job_id":"2c1dc316-4aff-452f-ad43-2a19ead0538f","html_url":"https://github.com/jhandguy/canary-deployment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhandguy%2Fcanary-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhandguy%2Fcanary-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhandguy%2Fcanary-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhandguy%2Fcanary-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhandguy","download_url":"https://codeload.github.com/jhandguy/canary-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225297538,"owners_count":17452010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argo-rollouts","canary-deployment","helm","ingress-nginx","k6","kind","kubernetes","prometheus"],"created_at":"2024-11-19T04:40:28.815Z","updated_at":"2024-11-19T04:40:29.386Z","avatar_url":"https://github.com/jhandguy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canary Deployment\n\nA sample project showcasing various Canary Deployment solutions.\n\n## Blog Posts\n\n- [Canary Deployment in Kubernetes (Part 1) — Simple Canary Deployment using Ingress NGINX](https://jhandguy.github.io/posts/simple-canary-deployment/)\n- [Canary Deployment in Kubernetes (Part 2) — Automated Canary Deployment using Argo Rollouts](https://jhandguy.github.io/posts/automated-canary-deployment/)\n- [Canary Deployment in Kubernetes (Part 3) — Smart Canary Deployment using Argo Rollouts and Prometheus](https://jhandguy.github.io/posts/smart-canary-deployment/)\n\n## Installing\n\n### Using ingress-nginx\n\n```shell\nkind create cluster --image kindest/node:v1.27.3 --config=kind/cluster.yaml\n\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm install ingress-nginx/ingress-nginx --name-template ingress-nginx --create-namespace -n ingress-nginx --values kind/ingress-nginx-values.yaml --version 4.8.3 --wait\n\nhelm install sample-app/helm-charts/ingress-nginx --name-template sample-app --create-namespace -n sample-app --wait\n\nhelm upgrade sample-app sample-app/helm-charts/ingress-nginx -n sample-app --reuse-values --set canary.weight=50 --wait\n```\n\n### Using argo-rollouts\n\n```shell\nkind create cluster --image kindest/node:v1.27.3 --config=kind/cluster.yaml\n\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm install ingress-nginx/ingress-nginx --name-template ingress-nginx --create-namespace -n ingress-nginx --values kind/ingress-nginx-values.yaml --version 4.8.3 --wait\n\nhelm repo add argo https://argoproj.github.io/argo-helm\nhelm install argo/argo-rollouts --name-template argo-rollouts --create-namespace -n argo-rollouts --set dashboard.enabled=true --version 2.32.5 --wait\n\nhelm install sample-app/helm-charts/argo-rollouts --name-template sample-app --create-namespace -n sample-app --wait\n\nkubectl argo rollouts dashboard -n argo-rollouts \u0026\nkubectl argo rollouts set image sample-app sample-app=ghcr.io/jhandguy/canary-deployment/sample-app:latest -n sample-app\nkubectl argo rollouts promote sample-app -n sample-app\n```\n\n### Using argo-rollouts + prometheus\n\n```shell\nkind create cluster --image kindest/node:v1.27.3 --config=kind/cluster.yaml\n\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm install ingress-nginx/ingress-nginx --name-template ingress-nginx --create-namespace -n ingress-nginx --values kind/ingress-nginx-values.yaml --version 4.8.3 --wait\n\nhelm repo add argo https://argoproj.github.io/argo-helm\nhelm install argo/argo-rollouts --name-template argo-rollouts --create-namespace -n argo-rollouts --set dashboard.enabled=true --version 2.32.5 --wait\n\nhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts\nhelm install prometheus-community/kube-prometheus-stack --name-template prometheus --create-namespace -n prometheus --version 54.2.2 --wait\n\nhelm install sample-app/helm-charts/argo-rollouts --name-template sample-app --create-namespace -n sample-app --set prometheus.enabled=true --wait\n\nkubectl argo rollouts dashboard -n argo-rollouts \u0026\nkubectl argo rollouts set image sample-app sample-app=ghcr.io/jhandguy/canary-deployment/sample-app:latest -n sample-app\nkubectl argo rollouts promote sample-app -n sample-app\n```\n\n## Smoke Testing\n\n### Weighted canary\n\n```shell\ncurl localhost/success -H \"Host: sample.app\" -v\ncurl localhost/error -H \"Host: sample.app\" -v\n```\n\n### Always canary\n\n```shell\ncurl localhost/success -H \"Host: sample.app\" -H \"X-Canary: always\" -v\ncurl localhost/error -H \"Host: sample.app\" -H \"X-Canary: always\" -v\n```\n\n### Never canary\n\n```shell\ncurl localhost/success -H \"Host: sample.app\" -H \"X-Canary: never\" -v\ncurl localhost/error -H \"Host: sample.app\" -H \"X-Canary: never\" -v\n```\n\n## Load Testing\n\n```shell\nk6 run k6/script.js\n```\n\n## Uninstalling\n\n```shell\nkind delete cluster\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhandguy%2Fcanary-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhandguy%2Fcanary-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhandguy%2Fcanary-deployment/lists"}