> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/dpr/1.1/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/dpr/1.1/installation/chart-configuration.md).

# Chart configuration reference

This document describes available options of the Diameter Proxy (DPR) chart. For the configuration of routing Diameter requests, configuration of Diameter transports, and other aspects of configuration, see the [Routing](https://docs.cennso.com/components/dpr/1.1/configuration/routing.md) document.

The following table lists the configurable parameters of the DPR chart and their default values.

| Parameter | Description | Default value |
|---|---|---|
| additionalLabels | Custom labels that are added to the DPR Deployment, Service, and ServiceMonitor resources | `{}` |
| annotations | Custom annotations that are added to the DPR Deployment | `{}` |
| initScript.enabled | Enables the init script on the DPR launch | `false` |
| initScript.image.repository | Image repository for the `initScript` container | `quay.io/travelping/nettools` |
| initScript.image.tag | Image tag for the `initScript` container | `v1.11.0` |
| initScript.image.pullPolicy | Image pull policy for the `initScript` container | `IfNotPresent` |
| initScript.script | Code of the init script | `echo "missing configuration script"` |
| fullnameOverride | Replaces the default, fully qualified application name, if present | `""` |
| nameOverride | Replaces the default application name and fully qualified application name, if present | `""` |
| diameter_proxy.image.repository | Repository that stores the DPR image | `registry.cennso.com/cennso/diameter_proxy` |
| diameter_proxy.image.tag | DPR image tag | `v1.1.2` |
| diameter_proxy.image.pullPolicy | Pull policy for DPR | `IfNotPresent` |
| diameter_proxy.env.sname | Value for the SNAME environment variable that specifies the short node name for the Erlang node | `diameter_proxy` |
| diameter_proxy.env.service | Service name for the Diameter application | `diameter_proxy` |
| diameter_proxy.env.origin_host | Value for the Origin-Host AVP in external connections | `epc.mnc001.mcc001.3gppnetwork.org` |
| diameter_proxy.env.origin_realm | Value for the Origin-Realm AVP in external connections | `epc.mnc001.mcc001.3gppnetwork.org` |
| diameter_proxy.sticky_session_setup | Enables sticky session setup | `false` |
| diameter_proxy.realms | Map of proxied realms and hosts | `{}` |
| diameter_proxy.transports | List of server and client Diameter transports | `{}` |
| calico.ipAddr | Enables the static IP address | `false` |
| endpoints_watcher.image | Image repository for the `endpoints_watcher` container | `registry.cennso.com/cennso/diameter_proxy/endpoints_watcher` |
| endpoints_watcher.tag | Tag for the `endpoints_watcher` container | `v1.1.2` |
| endpoints_watcher.enabled | Enables the `endpoints_watcher` container | `true` |
| resources.diameter_proxy.limits.cpu | CPU limit for DPR | `300m` |
| resources.diameter_proxy.limits.memory | Memory limit for DPR | `256Mi` |
| resources.diameter_proxy.requests.cpu | Minimum CPU needed for DPR | `100m` |
| resources.diameter_proxy.requests.memory | Minimum memory needed for DPR | `128Mi` |
| securityContext.capabilities.add | Capabilities added to the security context of VXLAN containers | `NET_ADMIN` |
| service.serviceMonitor.enabled | Enables or disables ServiceMonitor | `false` |
| service.serviceMonitor.targetLabels | Target labels for ServiceMonitor | `[]` |
| service.type | Service type | `ClusterIP` |
| unsafeSysctls.enabled | Enables or disables unsafe sysctls | `false` |
| unsafeSysctls.items | List of unsafe sysctls | `net.sctp.hb_interval=1000` |
| diameter_proxy_erl_options | Extra parameters for the BEAM virtual machine. The value of this config option will be set in the `ERL_FLAGS` environment variable. | `""`
| diameter_proxy.metrics.rtt_histogram_buckets | Buckets used for the `diameter_proxy_request_rtt_milliseconds` metric | `[5, 25, 50, 100, 250, 1000]`

## Additional configuration

The following tables list configurable parameters for optional operational features.

### Traffic capturing

These parameters configure the capturing of PCAP files that hold the node traffic:

| Parameter | Description | Default value |
|---|---|---|
| pcap.enabled | Enables or disables the container | `false` |
| pcap.image.repository` | Repository with the `pcap` image | `registry.cennso.com/cennso/pcap` |
| pcap.image.tag` | `pcap` image tag | `v1.3.1` |
| pcap.image.pullPolicy` | Pull policy for the `pcap` image | `IfNotPresent` |
| pcap.iface: | Interface to monitor | `mno0`, `mvno0` |
| pcap.maxfilesize: | Maximum files size before overwriting | `10` |
| pcap.maxfilenum | Maximum number of files before overwriting | `5` |
| resources.pcap.requests.cpu | pcap container CPU requests | `150m` |
| resources.pcap.requests.memory | pcap container memory requests | `64Mi` |
| resources.pcap.limits.cpu | pcap container CPU limits | `200m` |
| resources.pcap.limits.memory | pcap container memory limits | `128Mi` |

### Debug container with networking utils

DPR provides additional `debug` container with some handy networking tools installed. You can configure the container 
using these configuration options:

| Parameter | Description | Default value |
|---|---|---|
| debug.enabled | Enable network utilities container | `false` |
| debug.image.pullPolicy | Network utilities image pull policies | `IfNotPresent` |
| debug.image.repository | Network utilities image repository | `quay.io/travelping/nettools` |
| debug.image.tag | Network utilities image tag | `v1.10.1` |
| resources.debug.limits.cpu | Network utilities container CPU limits | `50m` |
| resources.debug.limits.memory | Network utilities container memory limits | `64Mi` |
| resources.debug.requests.cpu | Network utilities container CPU requests | `50m` |
| resources.debug.requests.memory | Network utilities container memory requests | `64Mi` |

The following additional utils are installed within the `debug` container:

* bpfc
* curl
* drill
* iperf3
* iproute2
* netsniff-ng
* socat
* tcpdump
* telnet
* trafgen

## Internal Erlang configuration

Here is a sample of the internal configuration handled by the Erlang application:

```
{diameter_proxy, [
    {metrics, [
        {path, "/metrics"},
        {port, 8080}
    ]},
    {sticky_session_setup, false},
    {realms, [
        {"alice.com",  ["nas1.alice.com","nas2.alice.com"]},
        {"bob.com",   ["nas.bob.com"]}
    ]},
    {capabilities, [
        {'Origin-Host', "diameter_proxy.travelping.net"},
        {'Origin-Realm', "traveping.net"},
        {'Product-Name', "Travelping Diameter proxy"},
        {'Vendor-Id', 18681}
    ]},
    {transports, [
        [{listen, <<"aaa://127.0.0.1:3868;transport=tcp">>},
         {reuseaddr, true},
         {buffer, 1024},
         {recbuf, 102400},
         {sndbuf, 102400},
         {nodealy, true}],
        [{connect_to, <<"aaa://172.17.0.2;transport=tcp">>},
         {reuseaddr, true},
         {sndbuf, 102400},
         {nodelay, true}]
    ]},
]}
```
