gitpod/components/workspace-rollout-job
Tarun Pothulapati f05f5bd1c3 [ws-rollout] Add prometheus init check
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>
2023-01-30 22:04:38 +01:00
..
2023-01-23 18:01:31 +01:00
2023-01-23 18:01:31 +01:00
2023-01-23 18:01:31 +01:00
2023-01-23 18:01:31 +01:00

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