Skip to content

Retain repositories pvc across install/unistalls

Stef Dunlap requested to merge keep-repositories-pvc into main

EmptyDir pvcs by definition are cleared when the pod is deleted, and thus each restart of skaffold dev would add ~30 seconds for the reference cloning from the repo pool.

However, simply switching to a "standard" storage class pvc doesn't wholely fix the problem because helm automatically deletes all of the resources it added on uninstall (and thus also when closing skaffold dev). This means PVCs also are deleted, and then their underlying persistence volume is deleted.

However, by adding the annotation "helm.sh/resource-policy: keep", helm will not delete the PVC, thus making the previously cloned repos available even after uninstalling.

All that remained was making the "clone-repos" job skip repos it had already claimed. These changes sped up skaffold dev by about 30 seconds.

Merge request reports

Loading