- Notifications
You must be signed in to change notification settings - Fork6
Example with Canary deployments for Argo Rollouts and Prometheus
License
codefresh-contrib/argo-rollout-canary-sample-app
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is an example Go application that exposes Prometheus metrics.It is compiled using Codefresh.
Original code modified fromhttps://gabrieltanner.org/blog/collecting-prometheus-metrics-in-golang
Run:
go buildto get the executable ORdocker build . -t example-appto create a container image if you prefer docker instead or don't have access to a Go dev environment
go run .ORdocker run -p 8080:8080 example-app
Then visithttp://localhost:8080 orhttp://localhost:8080/metrics
To install the controller
kubectl create namespace argo-rolloutskubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yamlTo create the first deployment
kubectl create ns canarykubectl apply -f ./canary-manual-approval -n canaryTo monitor the status
kubectl argo rollouts get rollout golang-sample-app-deployment --watch -n canaryTo create a new color
kubectl argo rollouts set image golang-sample-app-deployment golang-sample-app-container=kostiscodefresh/argo-rollouts-canary-sample-app:9c7732e -n canaryTo promote the color
kubectl argo rollouts promote golang-sample-app-deployment -n canaryTo reject or undo the deployment
kubectl argo rollouts abort canary-sample-app-deployment -n canarykubectl argo rollouts undo canary-sample-app-deployment -n canaryTo get the IP and port of the preview service
kubectl get svc rollout-canary-preview -n canary -o jsonpath='{.status.loadBalancer.ingress[0].ip}'kubectl get svc rollout-canary-preview -n canary -o jsonpath='{.spec.ports[0].port}'There is also acodefresh.yaml for easy usage with theCodefresh CI/CD platform.
More details can be found inCodefresh documentation
You can also importgraphana/graphana-dashboard.json as a premade dashboard
Enjoy!
About
Example with Canary deployments for Argo Rollouts and Prometheus
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
