> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/smc/3.15/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/smc/3.15/config/ergw-config.md).

# erGW configuration

The SMC Helm chart generates an erGW configuration file from your values. erGW is the core
component of SMC that handles all GTP, PFCP, Diameter, and RADIUS traffic. In most
deployments the generated configuration is sufficient.

> [!NOTE]
> The Helm values described on this page are intended for development, troubleshooting, and
> temporary workarounds in special cases. Use them only when directed by Cennso
> Professional Services.

Three Helm values control how the erGW configuration is produced:

| Parameter | Description | Default |
|---|---|---|
| `configOverlay` | Partial override map merged on top of the generated configuration. Overlay keys win; all other generated values are preserved. | — |
| `configYaml` | Complete erGW configuration as a YAML string. Replaces all generated configuration when set. | — |
| `config` | Complete erGW configuration as a JSON string. Replaces all generated configuration when set. Takes precedence over `configYaml`. | — |

These values are evaluated in order: `config` first, then `configYaml`, then the
template-generated configuration with any `configOverlay` applied. Only one path runs.

## View the generated configuration

Before applying any override, inspect the configuration the chart generates for your values
file. This shows the exact field paths and values erGW receives.

Run the following command to render the ConfigMap and extract the `ergw-config.yaml` section:

```console
helm template --namespace {NAMESPACE} {RELEASE_NAME} charts/smc \
  -f your-values.yaml \
  --show-only templates/configmap.yaml \
  | yq e '.data."ergw-config.yaml"' -
```

## Partial override with `configOverlay`

`configOverlay` lets you change specific fields in the generated configuration without
replacing it entirely. Set it to a YAML map in your values file. The chart uses
`mergeOverwrite` semantics: keys present in the overlay replace the corresponding
generated values, and the chart preserves all other generated keys.

Example — change the HTTP API port and disable acceptance of new sessions:

```yaml
configOverlay:
  node:
    accept_new: false
  http_api:
    port: 9090
```

The merge operates at the map level. In the example above, the chart preserves
`node.node_id`, `node.plmn_id`, and `http_api.ip` from the generated configuration.

The overlay fully replaces **list-valued fields** such as `sockets` and `handlers` — the
merge does not combine list elements. To change one item in a list, include all items in
the overlay.

> [!WARNING]
> `configOverlay` is applied after the chart generates the base configuration. Chart
> template validations — such as the check that rejects `0.0.0.0` as a socket interface
> address — run only against the generated values, not against overlay-provided values.
> An overlay can therefore produce an erGW configuration that the chart templates would
> normally reject during rendering.

`configOverlay` has no effect when `config` or `configYaml` is set.

## Full replacement with `configYaml` or `config`

`configYaml` and `config` replace the entire generated configuration. When either is
set, the chart passes the supplied value directly to erGW and ignores all template logic.
You are responsible for providing a complete, valid erGW configuration.

Use full replacement only when the chart templates cannot produce the configuration you
need and a partial overlay is insufficient. Maintaining a full replacement configuration
is more effort — every chart upgrade may introduce new required fields that your
replacement does not include.

```yaml
configYaml: |
  node:
    accept_new: true
    node_id: {NODE_ID}
    plmn_id:
      mcc: "{MCC}"
      mnc: "{MNC}"
    teid:
      len: 0
      prefix: 0
  # ... complete configuration required
```

For a description of all three override parameters, see the
[chart configuration reference](https://docs.cennso.com/components/smc/3.15/installation/chart-configuration.generated.md).
