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.yamlthat you used to install Codacy.
listener.nfsserverprovisioner.enabled: "false"and define the remaining
listener.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:
If you're using MicroK8s you must use the file
values-microk8s.yamltogether with the file
To do this, uncomment the last line before running the
helm upgradecommand below.
helm upgrade (...options used to install Codacy...) \ --version 8.1.0 \ --values values-production.yaml \ # --values values-microk8s.yaml
Validate that the
repository-listenerpod 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.
Edit this page on GitHub if you notice something wrong or missing.
If you have a question or need help please contact email@example.com.