This repository contains code examples for tracking canary deployment using ArgoCD and Levitate.
Read the complete story here https://last9.io/blog/real-time-canary-deployment-tracking-with-argo-cd-levitate/
brew install kind kubectl argoproj/tap/kubectl-argo-rollouts helm k6
git clone git@github.com:pree-dew/canary-deployment-with-argo-helm.git
kind create cluster --image kindest/node:v1.23.4 --config=kind/cluster.yaml
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx/ingress-nginx --name-template ingress-nginx --create-namespace -n ingress-nginx --values kind/ingress-nginx-values.yaml --version 4.0.19 --wait
helm repo add argo https://argoproj.github.io/argo-helm
helm install argo/argo-rollouts --name-template argo-rollouts --create-namespace -n argo-rollouts --set dashboard.enabled=true --version 2.14.0 --wait
kubectl create secret generic kubepromsecret-write --from-literal=username='xxx' --from-literal=password='xxx' -n prometheus
kubectl create secret generic kubepromsecret-read --from-literal=username='xxx' --from-literal=password='xxx' -n prometheus
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus-community/kube-prometheus-stack --name-template prometheus --create-namespace -n prometheus --version 34.8.0 --wait -f external_tsdb_configuration_values.yaml
cd sample-app/helm-charts/argo-rollouts/
vim values.yaml
replicas: 1
image:
registry: ghcr.io
repository: jhandguy/canary-deployment/sample-app
tag: 1.0.0
env:
# -- Last9 api call
last9_url: "https://gamma.last9.io/api/v4/organizations/last9/domain_events"
# -- Last9 api token
last9_token: xxx
notifications:
# -- Enable notifications controller
enabled: true
prometheus:
enabled: false
# -- read url with username:password format
address: https://username:password@read-gamma-tsdb.last9.io/hot/v1/metrics/xxx/sender/last9
helm install sample-app/helm-charts/argo-rollouts --name-template sample-app --create-namespace -n sample-app --set prometheus.enabled=true
kubectl argo rollouts dashboard -n argo-rollouts &
kubectl argo rollouts set image sample-app sample-app=ghcr.io/jhandguy/canary-deployment/sample-app:latest -n sample-app
kubectl get analysisrun -n sample-app
curl localhost/success -H "Host: sample.app" -H "X-Canary: always"