Skip to content
This documentation applies to Codacy Self-hosted v11.0.0

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:

  1. Edit the file values-production.yaml that you used to install Codacy.

  2. Set 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
    
  3. 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 file values-production.yaml.

    To do this, uncomment the last line before running the helm upgrade command below.

    helm upgrade (...options used to install Codacy...) \
                 --version 11.0.0 \
                 --values values-production.yaml \
                 # --values values-microk8s.yaml
    
  4. 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?

We're sorry to hear that. Please let us know what we can improve:

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.

Last modified July 15, 2022