Skip to content
This documentation applies to Codacy Self-hosted v1.4.0

For the latest updates and improvements, see the latest Cloud documentation instead.

HTTPS using LetsEncrypt

This documentation guides you on how to set up HTTPS for Codacy using (LetsEncript)[https://letsencrypt.org]

For this, we will use:

  • The cert-manager Kubernetes certificate management controller, configured to issue certificates from Let's Encrypt (a certificate authority providing free TLS certificates)

  • The NGINX Ingress Controller to perform TLS termination. This is already preinstalled if you followed our installation documentation for microk8s or AWS EKS.

1. Install the Certificate Manager

Install and set up cert-manager to issue certificates from Let's Encrypt:

  1. Start by adding the following chart repository to Helm:

    helm repo add jetstack https://charts.jetstack.io
    helm repo update
    
  2. Install the cert-manager custom resources and tag the namespace:

    kubectl label namespace codacy certmanager.k8s.io/disable-validation="true"
    
    # Kubernetes 1.15+
    # kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.1/cert-manager.crds.yaml
    
    # Kubernetes <1.15
    kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.1/cert-manager-legacy.crds.yaml
    
  3. Download the certificate issuer configuration file issuer-letsencrypt.yaml, edit the file to set your email address where indicated, and execute:

    kubectl apply --namespace codacy -f issuer-letsencrypt.yaml
    
  4. Finally, install the certificate manager.

    Download the cert-manager configuration file values-cert-manager.yaml, and execute:

    helm upgrade --install --version v0.15.1 codacy-cert-manager jetstack/cert-manager \
                 --namespace codacy \
                 --values values-cert-manager.yaml
    

2. Set up the Ingress

Set up Ingress to use TLS:

  1. Uncomment the TLS section in the codacy-ingress section of your values-prodcution.yaml file.

  2. Apply the new configuration by performing a Helm upgrade, using the same options you have previously used to install Codacy.

    helm upgrade (...options used to install Codacy...) \
                 --version 1.4.0 
    

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 August 25, 2020