mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
When given a non-usable `--prometheus-url`, We start the rollout without verifying if the prometheus is reachable or not. This is a problem as we will be unable to get the metrics from prometheus and hence the rollout will be reverted later causing unnecessary time waste. This can be prevented by performing a simple check to see if the prometheus is reachable or not. `up` query is used instead of key metrics as we can't be sure of their existence. Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
workspace-rollout-job
workspace-rollout-job performs a rollout from one workspace cluster to another while monitoring
metrics.
Running Locally
First, Connect to your application cluster and make sure the new cluster is
registered with a score of 0.
Then, Make sure kubeconfig for the application cluster is available
along with permissions to port-forward. (Follow ./hack/ws-rollout-job.yaml for an example)
Also, Make prometheus accessible:
kubectl -n monitoring-satellite port-forward prometheus-k8s-0 9090
Now, Run the job:
go run . --old-cluster <abc> --new-cluster <xyz> --prometheus-url <>
Rollout progress can either be monitored through logs or by metrics at localhost:9500/metrics