The Gerrit replica requires access to a persistent volume capable of running in Read Write Many (RWM)
-mode to store the git repositories, since the repositories have to be accessed by mutiple pods. One possibility to provide such volumes is to install a provisioner for NFS-volumes into the same Kubernetes-cluster. This document will guide through the process.
The Kubernetes external-storage project provides an out-of-tree dynamic provisioner for NFS volumes. A chart exists for easy deployment of the project onto a Kubernetes cluster. The chart's sources can be found here.
This guide will use Helm to install the NFS-provisioner. Thus, Helm has to be installed.
A custom values.yaml
-file containing a configuration tested with the gerrit-replica chart can be found in the supplements/nfs
-directory in the gerrit-replica chart's root directory. In addition a file stating the tested version of the nfs-server-provisioner chart is present in the same directory.
If needed, adapt the values.yaml
-file for the nfs-server-provisioner chart further and then run:
cd $(git rev-parse --show-toplevel)/helm-charts/gerrit-replica/supplements/nfs helm install nfs \ stable/nfs-server-provisioner \ -f values.yaml \ --version $(cat VERSION)
For a description of the configuration options, refer to the chart's documentation.
Here are some tips for configuring the nfs-server-provisioner chart to work with the gerrit-replica chart:
replica
led to some reliability issues in tests and should be further tested for now, if required.storageClasses.shared.name
mountOptions: vers=4.1
, due to compatibility issues with Ganesha.If no Pod or PVC is using a NFS-volume provisioned by the NFS server provisioner anymore, delete it like any other chart:
helm delete nfs