|
| 1 | +# Ephemeral developer workspaces |
| 2 | + |
| 3 | +Aiming to provide better developer experience when making contributions to kube-prometheus, whether by actively developing new features/bug fixes or by reviewing pull requests, we want to provide ephemeral developer workspaces with everything already configured (as far as tooling makes it possible). |
| 4 | + |
| 5 | +Those developer workspaces should provide a brand new kubernetes cluster, where kube-prometheus can be easily deployed and the contributor can easily see the impact that a pull request is proposing. |
| 6 | + |
| 7 | +Today there is 2 providers in the market: |
| 8 | +* [Github Codespaces](https://github.com/features/codespaces) |
| 9 | +* [Gitpod](https://www.gitpod.io/) |
| 10 | + |
| 11 | +## Codespaces |
| 12 | + |
| 13 | +Unfortunately, Codespaces is not available for everyone. If you are fortunate to have access to it, you can open a new workspace from a specific branch, or even from Pull Requests. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +After your workspace start, you can deploy a kube-prometheus inside a Kind cluster inside by running `make deploy`. |
| 20 | + |
| 21 | +If you are reviewing a PR, you'll have a fully-functional kubernetes cluster, generating real monitoring data that can be used to review if the proposed changes works as described. |
| 22 | + |
| 23 | +If you are working on new features/bug fixes, you can regenerate kube-prometheus's YAML manifests with `make generate` and deploy it again with `make deploy`. |
| 24 | + |
| 25 | +## Gitpod |
| 26 | + |
| 27 | +Gitpod is already available to everyone to use for free. It can also run commands that we speficy in the `.gitpod.yml` file located in the root directory of the git repository, so even the cluster creation can be fully automated. |
| 28 | + |
| 29 | +You can use the same workflow as mentioned in the [Codespaces](#Codespaces) section, however Gitpod doesn't have native support for any kubernetes distribution. The workaround is to create a full QEMU Virtual Machine and deploy [k3s](https://github.com/k3s-io/k3s) inside this VM. Don't worry, this whole process is already fully automated, but due to the workaround the whole workspace may be very slow. |
| 30 | + |
| 31 | +To open up a workspace with Gitpod, you can install the [Google Chrome extension](https://www.gitpod.io/docs/browser-extension/) to add a new button to Github UI and use it on PRs or from the main page. Or by directly typing in the browser `http://gitpod.io/#https://github.com/prometheus-operator/kube-prometheus/pull/<Pull Request Number>` or just `http://gitpod.io/#https://github.com/prometheus-operator/kube-prometheus` |
| 32 | + |
| 33 | + |
| 34 | + |
0 commit comments