## Enabling Ingress

To use ingress instead of the default Nginx service to expose your deployment,
disable Nginx in the values, and provide the host. The example assumes
an ingress-nginx controller is already available in your cluster:

```yaml
nginx:
  enabled: false

ingress:
  enabled: true
  hosts:
    - host: rasa-x.example.com  # DNS name / CNAME record for your cluster entrypoint
      paths:
        - /
```

## Configuring Nginx

If you are using Nginx and you need to customize its configuration to e.g. [enable SSL](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/tls), you will need to create a custom config map.

Your configmap should include **at least** the keys `nginx.conf`, `ssl.conf`, and `rasax.nginx.template`. If you include additional keys for other configuration templates, you need to specify the paths to which to mount these files under `nginx.extraVolumeMounts`. The standard versions of nginx.conf, ssl.conf, and rasax.nginx.template can be found [here](https://github.com/RasaHQ/rasa-x-helm/tree/main/charts/rasa-x/nginx-config-files). Assuming your customized versions of these files are in the directory `./custom-nginx-conf-files`, you can create a custom configmap as follows:

```bash
kubectl -n your-namespace create configmap custom-nginx-conf --from-file ./custom-nginx-conf-files
```

To use your custom configmap, specify its name in your values:

```yaml
nginx:
  # custom config map containing nginx.conf, ssl.conf.template, rasax.nginx.template
  customConfConfigMap: "custom-nginx-conf"
```

The configmap has to be created before you deploy Rasa Enterprise.

## Deploying to a Subpath

By default, Rasa Enterprise assumes it is being served at the root of the host. To serve it at a subpath,
e.g. "/rasa-x", you will need to use the following configuration in your `values.yaml`:

```yaml
nginx:
  subPath: "/rasa-x"

rasa-x:
  extraEnvs:
    - name: "ROOT_URL"
      value: www.example.com/rasa-x
```
