Gerrit 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 and Tiller will have to be installed.
values.yaml-file containing a configuration tested with the gerrit charts can be found in the
supplements/nfs-directory in the gerrit-master 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-master/supplements/nfs helm install stable/nfs-server-provisioner \ --name nfs \ -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-master chart:
replicaled to some reliability issues in tests and should be further tested for now, if required.
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 \ --purge