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.yamlthat 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.yamltogether with the filevalues-production.yaml.To do this, uncomment the last line before running the
helm upgradecommand below.helm upgrade (...options used to install Codacy...) \ --version 15.0.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
Was this page helpful?
Your feedback helps us improve the documentation.
255 characters left
Thanks for helping improve Codacy documentation.
For more detailed feedback, open an issue on GitHub.