For the latest updates and improvements, see the latest Cloud documentation instead.
Caching#
Codacy Self-hosted includes a built-in NFS server provisioner that deploys a shared volume to cache the cloned repository files while they're being analyzed by each tool. However, if you're dealing with big repositories or a high volume of analysis, using an NFS server external to the cluster will improve the performance of the cache.
To use your own external NFS server:
-
Edit the file
values-production.yaml
that you used to install Codacy. -
Set
listener.nfsserverprovisioner.enabled: "false"
and define the remaininglistener.cache.*
values as described below:listener: nfsserverprovisioner: enabled: false cache: name: listener-cache path: /data nfs: server: <NFS_SERVER_IP> # IP address of the external NFS server path: /var/nfs/data/ # External NFS server directory or file system to be mounted
-
Apply the new configuration by performing a Helm upgrade. To do so execute the command used to install Codacy:
Important
If you're using MicroK8s you must use the file
values-microk8s.yaml
together with the filevalues-production.yaml
.To do this, uncomment the last line before running the
helm upgrade
command below.helm upgrade (...options used to install Codacy...) \ --version 14.0.0 \ --values values-production.yaml \ # --values values-microk8s.yaml
-
Validate that the
repository-listener
pod is now using the external NFS server:$ kubectl describe pod -n codacy codacy-listener-<...> [...] Volumes: listener-cache: Type: NFS (an NFS mount that lasts the lifetime of a pod) Server: <NFS_SERVER_IP> Path: /var/nfs/data/ ReadOnly: false
Share your feedback 📢
Did this page help you?
Thanks for the feedback! Is there anything else you'd like to tell us about this page?
255 characters left
We're sorry to hear that. Please let us know what we can improve:
255 characters left
Alternatively, you can create a more detailed issue on our GitHub repository.
Thanks for helping improve the Codacy documentation.
If you have a question or need help please contact support@codacy.com.