In vhost-environments, patchdemo keeps a pool of repositories for core, extensions, skins, and modules. When an environment is created, it hard links the files instead of copying them, saving space.
Catalyst (or more precisely the mediawiki chart in ci-tools that catalyst uses), clones the repositories each time it makes a new environment. This means a full mediawiki environment consumes ~4GB of space.
The goal of this task is to copy or emulate the vhost-enveronments' "repository pool" pattern in ci-charts. They may be done with shared persistent volumes.
Below is an example of the steps of a solution. There may be other solutions, and the engineer should feel free to explore other options.
- add a persistent volume that is attached to patchdemo
- when k8s-patchdemo starts, it clones each repository that patchdemo supports into a "repository pool" on that persistent volume
- add the same persistent volume to each k8s-environment created through the mediawiki chart in ci-charts
- when starting an environment, instead of git clone-ing a new copy of the environment, make a new worktree from the repo in the repository pool
A/C
- when creating a new environment, the increase in disk usage on the kubernetes cluster is significantly smaller than what it was before this effort