> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/6.16/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/tposs/6.16/installation/configuration.md).

# TPOSS chart configuration

This document describes configurable parameters of the TPOSS chart. This is only the reference documentation of existing configuration options. For more detailed examples of TPOSS cluster configuration, see the documents under the **TPOSS configuration** section in the left navigation panel.

## General chart configuration

The following table lists general configurable parameters related to TPOSS pods:

| Key | Type | Description | Default |
|---|---|---|---|
| affinity | object | Assigns pods to the given nodes. For more information, see the official [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node). | `{}` |
| annotations | object | Annotations to apply to TPOSS StatefulSet pods. | `{}` |
| image.pullPolicy | string | TPOSS [image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy). | `"IfNotPresent"` |
| image.repository | string | Repository with the TPOSS image. | `"registry.cennso.com/cennso/tposs"` |
| image.tag | string | TPOSS image tag. | `"v6.16.0"` |
| imagePullSecrets | list | Image Pull Secrets for the TPOSS StatefulSet. | `[]` |
| ipAddr.enabled | bool | Set a static IP for the pod. If enabled, pod IP is used as the name of the Erlang node. | `false` |
| ipAddr.ip | string | Static IP address. The requested IP addresses are assigned from Calico IPAM and must exist within a configured IP pool. | `"127.0.0.1"` |
| labels | object | [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to apply to all resources in the TPOSS chart. | `{}` |
| podIP.enabled | bool | If enabled, pod IP is used as the name of the Erlang node. | `false` |
| replicaCount | int | Number of TPOSS replicas. | `1` |
| terminationGracePeriodSeconds | int | Termination grace period in seconds. The value must be at least cluster's [DNS TTL](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/) + 10 seconds, and no less than 10 seconds in general. | `30` |
| tolerations | list | Ensures pods can be scheduled on the `tposs` tainted node. For more information, see the official [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/). | `[]` |
| topologySpreadConstraints | object | Pod topology spread constraints. For more information, see the official [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). | `{}` |
| tposs_elixir_erl_options | string | Extra parameters for the BEAM virtual machine. For more information, see the [official documentation](https://www.erlang.org/docs/27/apps/erts/erl_cmd.html#flags). | `""` |
| tposs_migrate_db_on_start | bool | Run the database migration during TPOSS startup. | `true` |

## Additional charging settings

The following table lists configurable parameters to specify additional charging settings, such as tariff tenant:

| Key | Type | Description | Default |
|---|---|---|---|
| balance_activation_period | int | Time in seconds to check future balances. | `600` |
| balance_chunking.enabled | bool | Enables shared balance per different sessions. | `false` |
| ccs.cache.enabled | bool | Enables caching of charging data during the session creation. | `false` |
| tariff.change_time | string | Tariff time change in the `HH:MM` format. | `"22:00"` |
| tariff.tenant | string | Associates tariffs with tenants. | `"int.str.carisp.net"` |

## CDRs controllers configuration

TPOSS provides different handlers to store CDRs:

- CSV files
- MySQL database

All the configuration options to store CDRs in the MySQL database must be prefixed with the **cdr.controller.database** prefix, for example: **cdr.controller.database.enabled**. The following table lists configurable parameters to control the behavior of CDRs which are stored in the MySQL database:

| Key | Type | Description | Default |
|---|---|---|---|
| cdr.controller.database.cdr_cleanup_limit | string | Specifies the time after which closed CDRs are removed from the database. A value of this configuration option consists of two parts separated by dash: a number of units and time unit. The first part can be omitted. The following time units are supported: second(s), minute(s), hour(s), day(s), week(s), month(s), and year(s). Applicable only if the **cdr.controller.database.partitions_enabled** is set to `false.` | `"all"` |
| cdr.controller.database.cdr_cleanup_period | string | A period of time (in milliseconds) after which a special watcher process is triggered to check for CDRs for which the data retention period is over. | `"14-days"` |
| cdr.controller.database.cdr_cleanup_query_timeout | int | If partitions are disabled, this configuration option specifies timeout (in milliseconds) for a database query to clean up outdated CDRs. Applicable only if the **cdr.controller.database.partitions_enabled** is set to `false.` | `60000` |
| cdr.controller.database.clean_up_partitions_at | string | Specifies when to trigger an event to drop the outdated CDR partitions. The supported format is `"HH:MM"`. If set to an empty value, the stored procedure is triggered every 7 minutes. | `""` |
| cdr.controller.database.enabled | bool | Enables storing CDRs in the MySQL database. | `false` |
| cdr.controller.database.ignore | list | List of criteria for which CDRs are not generated. | `["Called-Station-Id:apn-1.*","Called-Station-Id:apn-2.*"]` |
| cdr.controller.database.initial_partitions_amount | int | Number of CDR table partitions that are initially created. | `24` |
| cdr.controller.database.new_partitions_amount | int | Number of partitions to create when the last partition becomes active. | `8` |
| cdr.controller.database.partitions_duration | string | Time duration to consider partition as active. | `"1-day"` |
| cdr.controller.database.partitions_enabled | bool | Enables CDR table partitioning. | `false` |
| cdr.controller.database.watcher_timeout | int | A period of time (in milliseconds) after which a special watcher process is triggered to check for CDRs for which the data retention period is over. Applicable only if the **cdr.controller.database.partitions_enabled** is set to `false.` | `300000` |
| cdr.controller.file.dir | string | Directory where CDR files are stored. | `"/srv/data/cdrs"` |
| cdr.controller.file.enabled | bool | Enables storing CDRs in CSV files. | `false` |
| cdr.controller.file.file_name_format | string | Format of a file name where closed CDRs are stored. | `"tposs_{start_at:ISO8601:UTC:STRIPPED}_{batch_id}_{sha256}.csv"` |
| cdr.controller.file.ignore | list | List of criteria for which CDRs are not generated. | `[]` |
| cdr.controller.file.max_count | int | Number of closed CDRs that can be written into one file before rotation. | `10` |
| cdr.controller.file.time_window | int | Time to rotate a CDR file in seconds. | `60` |

For more information, see the [Charging Data Records configuration](https://docs.cennso.com/components/tposs/6.16/configuration/charging.md#charging-data-records-configuration) section.

## Grafana dashboard

TPOSS Helm chart can automatically provision a dashboard definition used by Grafana to display TPOSS metrics.
This dashboard definition is wrapped in a ConfigMap which Grafana detects and applies using a sidecar container.

To activate this behaviour in Grafana, use the **sidecar.dashboards.enabled** option in the Grafana Helm chart.
For further information, see the Grafana Helm chart [documentation](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md).

| Key | Type | Description | Default |
|---|---|---|---|
| dashboard.enabled | bool | Enables the Grafana dashboard resource. | `false` |

For more information about TPOSS metrics, see the [Metrics](https://docs.cennso.com/components/tposs/6.16/metrics.md) document.

## Database clients configuration

The following table lists configurable parameters to specify how TPOSS should access the database:

| Key | Type | Description | Default |
|---|---|---|---|
| database.connections | int | Number of connections within the database pool. | `10` |
| database.driver | string | Database driver. | `"mysql"` |
| database.host | string | Database server endpoint. | `"127.0.0.1:3306"` |
| database.keepalive | bool | Specifies if database connections remain open for multiple queries. | `true` |
| database.name | string | Database name used by TPOSS. | `"tposs"` |
| database.password | string | Database client user password. | `"tposs"` |
| database.query_histogram_buckets | list | The time values that show how many queries were executed for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `[5,20,50,100,250,500]` |
| database.queue_histogram_buckets | list | The time values that show how many database clients waited in the queue for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `[1,5,20,50,100,200]` |
| database.queue_target | int | Timeout in milliseconds to wait for a free connection from the database connection pool. | `50` |
| database.recbuf | int | Database TCP buffer size. | `87380` |
| database.ssl | bool | Specifies if database connections are encrypted. | `false` |
| database.ssl_versions | string | SSL/TLS protocol version for database connection. | `"tlsv2"` |
| database.timeout | int | Database connection timeout. | `30000` |
| database.user | string | Database client user name. | `"tposs"` |

For more information, see the [Database client settings](https://docs.cennso.com/components/tposs/6.16/configuration/db.md) document.

## Hooks configuration

TPOSS supports events that send notifications whenever they occur. You can enable or disable each such event. If enabled, TPOSS sends notifications to the pre-configured endpoints.

The following sections provide information about the configurable parameters related to the `hooks`:

- [Balance threshold event](#balance-threshold-event)
- [Charging rules change event](#charging-rules-change-event)
- [MCC/MNC change event](#mccmnc-change-event)
- [First network attachment event](#first-network-attachment-event)
- [Visited country change event](#visited-country-change-event)

For more information, see the [Hooks configuration](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md) document.

### Balance threshold event

The following table lists configurable parameters for the [Balance theshold event](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md#balance-threshold-event):

| Key | Type | Description | Default |
|---|---|---|---|
| hooks.balance_volume_threshold.attempts | int | Number of attempts for sending failed balance volume threshold notifications. | `3` |
| hooks.balance_volume_threshold.delay | int | Delay in milliseconds between attempts. | `300` |
| hooks.balance_volume_threshold.enabled | bool | Enables the balance volume threshold notifications. | `false` |
| hooks.balance_volume_threshold.event | string | Event name. | `"tposs/charging/balance/updated"` |
| hooks.balance_volume_threshold.level | float | Level of used balance when a notification is sent. It takes the value between `0.0` and `1.0`. Multiple threshold values separated by a comma are supported. | `0.8` |
| hooks.balance_volume_threshold.proxy.addr | string | Address of a proxy server. | `"http://localhost:8086"` |
| hooks.balance_volume_threshold.proxy.enabled | bool | Enables a proxy server to send the balance volume threshold notifications over. | `false` |
| hooks.balance_volume_threshold.url | string | Endpoint of the hook handler. | `"http://localhost:8086/test/consumer"` |

### Charging rules change event

The following table lists configurable parameters for the [Charging rules change event](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md#charging-rules-change-event):

| Key | Type | Description | Default |
|---|---|---|---|
| hooks.charging_rules_changed.attempts | int | Number of attempts for sending failed charging rules change notifications. | `3` |
| hooks.charging_rules_changed.delay | int | Delay in milliseconds between attempts. | `300` |
| hooks.charging_rules_changed.enabled | bool | Enables the charging rules change notifications. | `false` |
| hooks.charging_rules_changed.event | string | Event name. | `"tposs/charging_rules/changed"` |
| hooks.charging_rules_changed.mcc_whitelist | string | List of Mobile Country Codes separated by comma for which the `Mobile Country Code Change` event is triggered. | `""` |
| hooks.charging_rules_changed.url | string | Endpoint of the hook handler. | `"http://localhost:8086/test/consumer"` |

### MCC/MNC change event

The following table lists configurable parameters for the [MCC/MNC change event](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md#mccmnc-change-event):

| Key | Type | Description | Default |
|---|---|---|---|
| hooks.mccmnc_changed.attempts | int | Number of attempts for sending failed MCC-MNC notifications. | `3` |
| hooks.mccmnc_changed.delay | int | Delay in milliseconds between attempts. | `300` |
| hooks.mccmnc_changed.enabled | bool | Enables the MCC-MNC change notifications. | `false` |
| hooks.mccmnc_changed.event | string | Event name. | `"tposs/location/mccmnc/updated"` |
| hooks.mccmnc_changed.proxy.addr | string | Address of a proxy server. | `"http://localhost:8086"` |
| hooks.mccmnc_changed.proxy.enabled | bool | Enables a proxy server to send the MCC-MNC change notifications over. | `false` |
| hooks.mccmnc_changed.url | string | Endpoint of the hook handler. | `"http://localhost:8086/test/consumer"` |

### First network attachment event

The following table lists configurable parameters for the [First network attachment event](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md#first-network-attachment-event):

| Key | Type | Description | Default |
|---|---|---|---|
| hooks.network_attachment.first.attempts | int | Number of attempts for sending failed first network attachment notifications. | `3` |
| hooks.network_attachment.first.delay | int | Delay in milliseconds between attempts. | `300` |
| hooks.network_attachment.first.enabled | bool | Enables the first network attachment notifications. | `false` |
| hooks.network_attachment.first.event | string | Event name. | `"tposs/network/attachment/first"` |
| hooks.network_attachment.first.proxy.addr | string | Address of a proxy server. | `"http://localhost:8086"` |
| hooks.network_attachment.first.proxy.enabled | bool | Enables a proxy server to send the first network attachment notifications over. | `false` |
| hooks.network_attachment.first.url | string | Endpoint of the hook handler. | `"http://localhost:8080/test/consumer"` |

### Visited country change event

The following table lists configurable parameters for the [Visited country change event](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md#visited-country-change-event):

| Key | Type | Description | Default |
|---|---|---|---|
| hooks.visited_country_changed.attempts | int | Number of attempts for sending failed visited country changed notifications. | `3` |
| hooks.visited_country_changed.delay | int | Delay in milliseconds between attempts. | `300` |
| hooks.visited_country_changed.enabled | bool | Enables the visited country changed notification. | `false` |
| hooks.visited_country_changed.event | string | Event name. | `"tposs/location/visitedCountry/updated"` |
| hooks.visited_country_changed.proxy.addr | string | Address of a proxy server. | `"http://localhost:8086"` |
| hooks.visited_country_changed.proxy.enabled | bool | Enables a proxy server to send the country changed notifications over. | `false` |
| hooks.visited_country_changed.url | string | Endpoint of the hook handler. | `"http://localhost:8086/test/consumer"` |

## TPOSS init script configuration

The following table lists configuration options related to the TPOSS init script [init container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/):

| Key | Type | Description | Default |
|---|---|---|---|
| initScript.enabled | bool | Enables the init script before the start of the TPOSS instance. | `false` |
| initScript.env | object | Environment variables with which the init script is launched. | `{}` |
| initScript.image.pullPolicy | string | [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) for the `initScript` container. | `"IfNotPresent"` |
| initScript.image.repository | string | Image repository for the `initScript` container. | `"quay.io/travelping/nettools"` |
| initScript.image.tag | string | Image tag for the `initScript` container. | `"v1.12.0"` |
| initScript.script | string | The script code itself. | `"echo \"missing configuration script\"\n"` |

## IP pools and service profiles configuration

The following table lists TPOSS IP pools and service profiles configuration:

| Key | Type | Description | Default |
|---|---|---|---|
| ippools | object | List of IP pools. | `{}` |
| ippools_selectors | object | List of IP pools selectors. | `{}` |
| profiles | object | List of service profiles. | `{}` |

For more information, see the:

- [IP pools configuration](https://docs.cennso.com/components/tposs/6.16/configuration/ip-pools-profiles.md#ip-pools-configuration)
- [Service profile configuration](https://docs.cennso.com/components/tposs/6.16/configuration/ip-pools-profiles.md#service-profiles-configuration)

## TPOSS logging

TPOSS provides the following configuration options to control the logging behaviour:

| Key | Type | Description | Default |
|---|---|---|---|
| log.console.format | string | Format of the TPOSS logs. The available formats are `default` and `json`. | `"default"` |
| log.console.level | string | Logging level for the TPOSS logger. | `"info"` |

For more information, see the [Logging configuration](https://docs.cennso.com/components/tposs/6.16/configuration/logging.md) document.

## TPOSS ServiceMonitor and metrics configuration

You can provision a ServiceMonitor and configure a Prometheus instance to fetch metrics from TPOSS. You can configure it using the following configuration options:

| Key | Type | Description | Default |
|---|---|---|---|
| metrics.network_session_labels | string | List of labels for the `sessions_GGSN` metric. The possible values are: `visitedNetworkMCC`, `visitedNetworkMNC`, and `activeProfile`. | `""` |
| servicemonitor.annotations | object | ServiceMonitor annotations. | `{}` |
| servicemonitor.enabled | bool | Enables the Prometheus ServiceMonitor. For more information, see the [official documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md). | `false` |
| servicemonitor.interval | string | Metrics scrape interval. | `"30s"` |
| servicemonitor.labels | object | ServiceMonitor [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{"release":"prometheus-operator"}` |
| servicemonitor.namespaceSelector | object | ServiceMonitor namespace selector. | `{}` |
| servicemonitor.scrapeTimeout | string | Metrics scrape timeout. | `"30s"` |
| servicemonitor.selector.matchLabels | object | ServiceMonitor selector labels. | `{"app":"tposs"}` |
| servicemonitor.targetLabels | list | ServiceMonitor target labels. | `[]` |

If the **sessions.backend** configuration value is set to `mysql`, you can configure a set of labels of the `sessions_GGSN` metric with the **metrics.network_session_labels** configuration option. The value of the **metrics.network_session_labels** option contains labels attached to the `sessions_GGSN` metric separated by a comma. The possible values for the **metrics.network_session_labels** option are:

* `visitedNetworkMCC` - Mobile Country Code of a subscriber
* `visitedNetworkMNC` - Mobile Network Code of a subscriber
* `activeProfile` - home country of a subscriber

>**NOTE:** The high number of MCCs, MNCs, and home countries may lead to significant resource consumption. To learn how to disable a certain label or all labels of the `sessions_GGSN` metric, see the [Troubleshooting guide](https://docs.cennso.com/components/tposs/6.16/troubleshooting/metrics.md#reinitialize-the-sessions_ggsn-metric).

## Mnesia configuration

The following table lists configurable parameters for the [mnesia](https://www.erlang.org/doc/apps/mnesia/mnesia.html) sessions storage backend:

| Key | Type | Description | Default |
|---|---|---|---|
| mnesia.dc_dump_limit | int | Controls how often disc_copies tables are dumped from memory. For more information, see the [official documentation](https://www.erlang.org/docs/27/apps/mnesia/mnesia.html). Applicable only if the **sessions.backend** is set to `mnesia`. | `4` |
| mnesia.dump_log_write_threshold | int | An integer number that specifies the maximum number of changes allowed to the transaction log before a new dump of the log is performed. For more information, see the [official documentation](https://www.erlang.org/docs/27/apps/mnesia/mnesia.html). Applicable only if the **sessions.backend** is set to `mnesia`. | `100` |
| sessiondb.storage_type | string | Mnesia storage for PCS sessions. The possible values are `disc` and `memory`. | `"disc"` |

>**NOTE:** These configuration options are applicable only if the value of the **sessions.backend** configuration option is set to `mnesia`.

## NATS services

The following table lists configurable parameters for NATS services that TPOSS uses to interact with the NATS server:

| Key | Type | Description | Default |
|---|---|---|---|
| nats-services.global-lock-provider.backoff_period | int | Time in milliseconds to re-connect to NATS in case connection is lost. | `1000` |
| nats-services.global-lock-provider.connections_per_stream | int | Number of connections per stream. In general, TPOSS creates seven streams, so the total number of connections TPOSS tries to establish towards NATS is this number multiplied by seven. | `5` |
| nats-services.global-lock-provider.enabled | bool | Enables support for global lock based on NATS. | `true` |
| nats-services.global-lock-provider.recv_timeout | int | Timeout in milliseconds that specifies the maximum wait time for a response from NATS. | `3000` |
| nats-services.global-lock-provider.request_histogram_buckets | string | The time values that show how many NATS requests were handled for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `"10, 100, 1000, 5000, 10000"` |
| nats-services.global-lock-provider.send_timeout | int | Timeout in milliseconds that specifies the maximum wait time for the underlying TCP stack to accept a send operation. | `3000` |
| nats-services.global-lock-provider.server | string | Endpoint of the NATS server. | `"localhost:4222"` |
| nats-services.global-lock-provider.storage_type | string | Determines how messages are stored for retention. The possible values are `memory` and `file`. | `"memory"` |
| nats-services.global-lock-provider.stream | string | NATS service stream name to create locks managed by the lock manager. It is also used as a prefix for the topic names TPOSS uses to send lock messages. | `"TPOSS_LOCK_MGR"` |
| nats-services.global-lock-provider.ttl | int | Time in milliseconds that specifies how long a lock message is preserved in NATS. | `5000` |

For more information about NATS deployment and the NATS client configuration, see the [NATS configuration](https://docs.cennso.com/components/tposs/6.16/installation/nats.md) and the [Session management](https://docs.cennso.com/components/tposs/6.16/configuration/session.md#session-handler-locking) documents.

## Debug container with network utilities

TPOSS provides the additional `debug` container with networking tools installed. You can configure the container using the following configuration options:

| Key | Type | Description | Default |
|---|---|---|---|
| networkUtility.enabled | bool | Enables the debug container with network utilities. | `false` |
| networkUtility.image.pullPolicy | string | Network utilities [image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy). | `"IfNotPresent"` |
| networkUtility.image.repository | string | Network utilities image repository. | `"quay.io/travelping/nettools"` |
| networkUtility.image.tag | string | Network utilities image tag. | `"v1.12.0"` |

The following additional utilities are installed within the `tposs-debugging-sidecar` container:

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

## Network events API settings

The following table lists configurable parameters for the network events API:

| Key | Type | Description | Default |
|---|---|---|---|
| network_events_exposure_api.cleanup_interval | int | Interval in milliseconds in which the cleanup for network events API subscriptions is executed. | `60000` |
| network_events_exposure_api.enabled | bool | Enables network events exposure API. | `false` |

## Persistence configuration

To store CDRs in the CSV files, enable support for persistent volumes. The following table lists the configurable parameters related to the persistance:

| Key | Type | Description | Default |
|---|---|---|---|
| persistence.accessMode | string | PVC access mode. | `"ReadWriteOnce"` |
| persistence.enabled | bool | Enables PVC for TPOSS. | `true` |
| persistence.existingClaim | string | PVC existing claim name. | `""` |
| persistence.size | string | PVC size. | `"8Gi"` |
| persistence.storageClass | string | PVC storage class name. | `""` |
| tposs_useEmptyDir | bool | Creates an [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume for storing closed CDRs. | `false` |

For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistent-volumes).

## TPOSS liveness and readiness probes configuration

The following table lists configurable parameters for the [Kubernetes liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration:

| Key | Type | Description | Default |
|---|---|---|---|
| probes.enabled | bool | Enables liveness and readiness probes. | `true` |
| probes.liveness.failureThreshold | int | Number of failed liveness probes after which the whole check is failed. | `3` |
| probes.liveness.initialDelaySeconds | int | Number of seconds before the first liveness probe is triggered. | `15` |
| probes.liveness.periodSeconds | int | Number of seconds after which the liveness probe is repeated. | `10` |
| probes.liveness.timeoutSeconds | int | Number of seconds after which the liveness probe times out. | `3` |
| probes.readiness.failureThreshold | int | Number of failed readiness probes after which the whole check is failed. | `3` |
| probes.readiness.initialDelaySeconds | int | Number of seconds before the first readiness probe is triggered. | `20` |
| probes.readiness.periodSeconds | int | Number of seconds after which the readiness probe is repeated. | `10` |
| probes.readiness.timeoutSeconds | int | Number of seconds after which the readiness probe times out. | `3` |

## Prometheus recording rules

You can configure [Prometheus recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) using the PrometheusRule custom resource (CR). This CR provides two additional metrics:

- `sessions_network_total` - provides the total number of network sessions
- `sessions_service_total` - provides the total number of service sessions

To enable or disable the PrometheusRule CR, use this parameter:

| Key | Type | Description | Default |
|---|---|---|---|
| prometheus_recording_rules.enabled | bool | Enables provisioning of the Prometheus recording rules. | `false` |

## RADIUS configuration

The following table lists configurable parameters for RADIUS communication:

| Key | Type | Description | Default |
|---|---|---|---|
| radius.acct_identify_by.enabled | bool | Enables identification of SMF/TDF Accounting requests. | `false` |
| radius.acct_identify_by.identified_by | string | Specifies how to identify SMF/TDF Authentication requests. The possible values are `nas_id` and `ip`. | `"nas_id"` |
| radius.acct_identify_by.nas_ids | list | List of regular expressions for NAS-ID-based identification. | `["SCG$","SCG-1","SCG-2"]` |
| radius.acct_listen | string | RADIUS Accounting server listener. | `"0.0.0.0:1813"` |
| radius.acct_source | object | List of RADIUS sources from which the incoming accounting requests are coming. The format of each source is `source-key: [NAS-Identifier]:secret@ip-address[/N][,...]`. The `source-key` can be one of: `ggsn`, `scg`, or `ruckus`. `NAS-Identifier` is optional. It is used in RADIUS metrics, if defined. The `secret` part is a shared secret - the password shared between the client and the RADIUS server. The source itself is represented by the IP address or the range of IP addresses. The range of IP addresses consists of an IP address and a subnet mask. | `{}` |
| radius.auth_identify_by.enabled | bool | Enables identification of SMF/TDF Authentication requests. | `false` |
| radius.auth_identify_by.identified_by | string | Specifies how to identify SMF/TDF Authentication requests. The possible values are `nas_id` and `ip`. | `"nas_id"` |
| radius.auth_identify_by.nas_ids | list | List of regular expressions for NAS-ID-based identification. | `["^SCG$","SCG-1","SCG-2"]` |
| radius.auth_listen | string | RADIUS Authentication server listener. | `"0.0.0.0:1812"` |
| radius.auth_source | object | List of RADIUS sources from which the incoming authorization requests are coming. The format of each source is `source-key: [NAS-Identifier]:secret@ip-address[/N][,...]`. The `source-key` can be one of: `ggsn`, `scg`, or `ruckus`. `NAS-Identifier` is optional. It is used in RADIUS metrics, if defined. The `secret` part is a shared secret - the password shared between the client and the RADIUS server. The source itself is represented by the IP address or the range of IP addresses. The range of IP addresses consists of an IP address and a subnet mask. | `{}` |
| radius.connect_coa | list | List of RADIUS CoA/Disconnect endpoints. | `["secret@0.0.0.0:3799"]` |
| radius.default_attrs | object | List of RADIUS AVPs for which TPOSS will set default values if AVPs were not provided by a RADIUS request. | `{}` |
| radius.disconnect_request_retries | int | Number of tries to re-send RADIUS Disconnect requests. Applicable only if **radius.ggsn_creation_on_accounuting** is set to `false`. | `3` |
| radius.disconnect_request_timeout | int | Timeout in milliseconds that specifies how long TPOSS waits for the RADIUS Disconnect responses. Applicable only if **radius.ggsn_creation_on_accounuting** is set to `false`. | `5000` |
| radius.ggsn_creation_on_accounting | bool | Allows to create network sessions on RADIUS Accounting-Start and Diameter Gx requests. | `false` |
| radius.monitoring_password | string | RADIUS monitoring user password. | `"secret"` |
| radius.monitoring_user | string | RADIUS monitoring user username. | `"monitoringuser"` |
| radius.recbuf | string | Size of receive buffer in bytes. | `"204800"` |
| radius.request_retries | int | Number of tries to re-send RADIUS Accounting requests. Applicable only in the environments with vSCG (**scg.diameter.enabled** and **sbi.enabled** set to `false`). | `3` |
| radius.request_timeout | int | Timeout in milliseconds that specifies how long TPOSS waits for the RADIUS Accounting responses. Applicable only in the environments with vSCG (**scg.diameter.enabled** and **sbi.enabled** set to `false`). | `5000` |
| radius.resend_timeout | int | Timeout in milliseconds that specifies how long to store a response in a cache. | `5000` |
| radius.rtt_histogram_buckets | list | The time values that show how many RADIUS requests were handled for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `[10,30,50,75,100,1000,2000]` |
| scg.radius_endpoints.1.nas_id | string | NAS-Identifier of an SMF/TDF instance. The `ID` is a unique identifier to identify an SMC/TDF instance. | `"scg_one"` |
| scg.radius_endpoints.1.uri | string | RADIUS endpoint of an SMF/TDF RADIUS Accounting server. The `ID` is a unique identifier to identify an SMF/TDF instance. | `"secret@127.0.0.1:1813"` |

For more information, see the [RADIUS settings](https://docs.cennso.com/components/tposs/6.16/configuration/radius.md) document.

## Resources configuration

The following table lists configurable parameters for the [resource management](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for TPOSS pods:

| Key | Type | Description | Default |
|---|---|---|---|
| resources.cpu_limit | string | TPOSS CPU limit. | `"1000m"` |
| resources.cpu_request | string | TPOSS CPU request. | `"250m"` |
| resources.initScript.limits.cpu | string | The init script container CPU limit. | `"50m"` |
| resources.initScript.limits.memory | string | The init script container memory limit. | `"64Mi"` |
| resources.initScript.requests.cpu | string | The init script container CPU request. | `"50m"` |
| resources.initScript.requests.memory | string | The init script container memory request. | `"64Mi"` |
| resources.memory_limit | string | TPOSS memory limit. | `"2Gi"` |
| resources.memory_request | string | TPOSS memory request. | `"512Mi"` |

## SBI configuration

The following table lists configurable parameters for SBI API:

| Key | Type | Description | Default |
|---|---|---|---|
| sbi.enabled | bool | Enables 5G SBIs in TPOSS. | `false` |
| sbi.userdata_on_nnas | bool | Returns user data (like IMSI, Calling-Station-Id, and optional IMEISV) from TPOSS on SBI Nnas requests. | `false` |
| sbi.validation_enabled | bool | Enables content validation of the incoming and outgoing SBI requests. | `false` |

For more information, see the [SBI API](https://docs.cennso.com/components/tposs/6.16/architecture/sbi.md) document.

## Rating groups and charging rules configuration

TPOSS provides support for dynamic PCC rules and rating groups. The following table lists configurable parameters for the default charging rules that are used to charge user traffic:

| Key | Type | Description | Default |
|---|---|---|---|
| scg.adc_rules.b2binternet | string | Name for the B2BInternet rating group. | `"B2BInternet"` |
| scg.adc_rules.non_whitelisted_imei | string | Name for the FactoryTest rating group. | `"FactoryTest"` |
| scg.adc_rules.online | string | Name for the Online rating group. | `"Online"` |
| scg.adc_rules.online_redirection | string | Name for the OnlineRedirection rating group. | `"OnlineRedirection"` |
| scg.adc_rules.portal | string | Name for the Portal rating group. | `"Portal"` |
| scg.adc_rules.unlimited_streaming | string | Name for the UnlimitedStreaming rating group. | `"UnlimitedStreaming"` |
| scg.adc_rules.unlimited_streaming_pd | string | Name for the UnlimitedStreamingPD rating group. | `"UnlimitedStreamingPD"` |
| scg.b2b_internet_quota | int | Traffic quota that is allocated for subscribers with the B2BInternet charging rule. | `1073741824` |
| scg.rating_groups.b2binternet | int | Value of the B2BInternet rating group. | `3225` |
| scg.rating_groups.non_whitelisted_imei | int | Value of the FactoryTest rating group. | `2100` |
| scg.rating_groups.online | int | Value of the Online rating group. | `1000` |
| scg.rating_groups.online_redirection | int | Value of the OnlineRedirection rating group. | `4000` |
| scg.rating_groups.portal | int | Value of the Portal rating group. | `2000` |
| scg.rating_groups.unlimited_streaming | int | Value of the UnlimitedStreaming rating group. | `3000` |
| scg.rating_groups.unlimited_streaming_pd | int | Value of the UnlimitedStreamingPD rating group. | `3100` |
| scg.rating_groups_exclude_rules.b2binternet | string | List of PCC rules to exclude if the B2BInternet rule is allocated. | `"OnlineRedirection, Portal"` |
| scg.rating_groups_exclude_rules.non_whitelisted_imei | string | List of PCC rules to exclude if the FactoryTest rule is allocated. | `"Portal"` |
| scg.rating_groups_exclude_rules.online | string | List of PCC rules to exclude if the Online rule is allocated. | `"OnlineRedirection"` |
| scg.rating_groups_quotas.b2binternet | int | Predefined quota for the B2BInternet rating group. | `1073741824` |
| scg.rating_groups_quotas.non_whitelisted_imei | int | Predefined quota for the FactoryTest rating group. | `999999999` |
| scg.rating_groups_quotas.online_redirection | int | Predefined quota for the OnlineRedirection rating group. | `999999999` |
| scg.rating_groups_quotas.portal | int | Predefined quota for the Portal rating group. | `999999999` |
| scg.rating_groups_quotas.unlimited_streaming | int | Predefined quota for the UnlimitedStreaming rating group. | `999999999` |
| scg.rating_groups_quotas.unlimited_streaming_pd | int | Predefined quota for the UnlimitedStreamingPD rating group. | `999999999` |
| scg.rating_groups_selectors.b2binternet | string | Selector for the B2BInternet rating group. | `"handler = b2binternet"` |
| scg.rating_groups_selectors.non_whitelisted_imei | string | Selector for the FactoryTest rating group. | `"handler = whitelist"` |
| scg.rating_groups_selectors.online | string | Selector for the Online rating group. | `"handler = online"` |
| scg.rating_groups_selectors.unlimited_streaming | string | Selector for the UnlimitedStreaming rating group. | `"handler = unlimited_streaming"` |
| scg.rating_groups_selectors.unlimited_streaming_pd | string | Selector for the UnlimitedStreamingPD rating group. | `"handler = unlimited_streaming"` |
| scg.rating_groups_validity_time.b2binternet | int | Validity time in seconds for the B2BInternet rating group. | `180` |
| scg.rating_groups_validity_time.non_whitelisted_imei | int | Validity time in seconds for the FactoryTest rating group. | `180` |
| scg.rating_groups_validity_time.online | int | Validity time in seconds for the Online rating group. | `180` |
| scg.rating_groups_validity_time.online_redirection | int | Validity time in seconds for the OnlineRedirection rating group. | `180` |
| scg.rating_groups_validity_time.portal | int | Validity time in seconds for the Portal rating group. | `180` |
| scg.rating_groups_validity_time.unlimited_streaming | int | Validity time in seconds for the UnlimitedStreaming rating group. | `180` |
| scg.rating_groups_validity_time.unlimited_streaming_pd | int | Validity time in seconds for the UnlimitedStreamingPD rating group. | `180` |
| scg.rules.authenticated | string | Name for the Portal Access-Class if Diameter is disabled. Applicable only if **scg.diameter.enabled** is set to `false`. | `"Portal"` |
| scg.rules.authorized | string | Name for the Online Access-Class if Diameter is disabled. Applicable only if **scg.diameter.enabled** is set to `false`. | `"Online"` |
| scg.rules.unknown | string | Name for the Known Access-Class if Diameter is disabled. Applicable only if **scg.diameter.enabled** is set to `false`. | `"Known"` |
| scg.unlimited_streaming.enabled | bool | Enables UnlimitedStreaming and UnlimitedStreamingPD rating groups. | `true` |

For more information, see the [Charging rules configuration](https://docs.cennso.com/components/tposs/6.16/configuration/charging.md#charging-rules-configuration) section.

## Diameter configuration

The following table lists configurable parameters for Diameter communication:

| Key | Type | Description | Default |
|---|---|---|---|
| scg.creation_on_nasreq | bool | Allows TPOSS to create service sessions based on Diameter NASREQ-AAR requests. | `false` |
| scg.diameter.asr_timeout | int | Timeout in milliseconds for ASR requests. | `30000` |
| scg.diameter.buffer | int | Size of the in-memory buffer for Diameter requests/responses. | `425984` |
| scg.diameter.enable_cgnat | bool | Enables NAT-binding on Diameter NASREQ-AAR requests. | `false` |
| scg.diameter.enabled | bool | Enables the Diameter server. | `false` |
| scg.diameter.if_rtt_buckets | string | The time values that show how many Diameter requests per Diameter interface were handled for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `"10, 30, 50, 75, 100, 1000, 2000"` |
| scg.diameter.listener | string | TPOSS Diameter listener address. | `"aaa://localhost:3868"` |
| scg.diameter.pool_size | int | Number of connections that the Diameter server accepts. | `1` |
| scg.diameter.rar_timeout | int | Timeout in milliseconds for RAR requests. | `30000` |
| scg.diameter.realm | string | Origin-Realm used by TPOSS. | `"tpip.net"` |
| scg.diameter.recbuf | int | Size of the Diameter receive buffer in bytes. | `212992` |
| scg.diameter.rtt_buckets | string | The time values that show how many Diameter requests were handled for that time or less. The values are translated into Prometheus histogram buckets and are provided in milliseconds. | `"10, 30, 50, 75, 100, 1000, 2000"` |
| scg.diameter.sndbuf | int | Size of the Diameter send buffer in bytes. | `212992` |
| scg.diameter.wait_time_gy_terminate | int | Timeout in seconds for Gy terminate requests. | `10` |
| scg.userdata_on_nasreq | bool | Returns user data (like IMSI, Calling-Station-Id, and optional IMEISV) from TPOSS on Diameter NASREQ-AAR requests. | `false` |

For more information, see the [Diameter settings](https://docs.cennso.com/components/tposs/6.16/configuration/diameter.md) document.

## PCS sessions configuration

The following table lists configurable parameters to control the behaviour of PCS sessions in TPOSS:

| Key | Type | Description | Default |
|---|---|---|---|
| scg.interim_interval | int | Interval in seconds for RADIUS Accounting-Update requests for service sessions. | `60` |
| scg.zone_id | string | SMF/TDF zone ID. | `"MOBILE"` |
| sessions.backend | string | Type of the backend storage for PCS sessions. The possible values are `mnesia` or `mysql`. | `"mnesia"` |
| sessions.cache | bool | Enables in-memory cache for PCS sessions. | `false` |
| sessions.cache_backend | string | Specifies a cache backend for PCS sessions. The possible values are `ets` and `redis`. Applicable only if the **sessions.cache** is set to `true`. | `"ets"` |
| sessions.ggsn.default_imeisv | string | Default value of 3GPP-IMEISV, in case the value is not passed in a RADIUS request. | `"nil"` |
| sessions.ggsn.disconnect_without_framed_ip.enabled | bool | If `true`, a RADIUS Disconnect request is sent to PGW if there is no `Framed-IP-Address` in the network sessions. If `false`, the network sessions are deleted without any notification. | `true` |
| sessions.ggsn.disconnect_without_framed_ip.only_older_than | int | Deletes network sessions without a framed IP address only if the session is older than the given number of seconds. Applicable only if **sessions.ggsn.disconnect_without_framed_ip = true**. | `0` |
| sessions.ggsn.imeisv_required | bool | Specifies if 3GPP-IMEISV is a mandatory RADIUS attribute. | `false` |
| sessions.ggsn.keepalive_timeout | int | Network sessions keepalive period in seconds. For environments where TPOSS can't notify PGW about session termination, it should be set to zero. | `5400` |
| sessions.global_lock.algorithm | string | Defines the algorithm or a lock provider to use for locking sessions across the cluster. The possible values are: "global", "locks", "custom", or the NATS service name defined in **nats-services.{NATS_SERVICE_NAME}**. | `"global-lock-provider"` |
| sessions.global_lock.enabled | bool | Enables the global lock for sessions across TPOSS nodes within the TPOSS cluster. | `true` |
| sessions.idle_timer_check_period | int | Interval in milliseconds to check for idle sessions. If set to `0`, the idle timer functionality is disabled. Setting this option to a too low value may cause high load on the database. | `5000` |
| sessions.idle_timer_enabled | bool | Enables or disables the idle timer for PCS sessions. | `true` |
| sessions.idle_timers_check_limit | int | Number of idle timer records to fetch from a database at once to check them for expiration. | `1` |
| sessions.redis.connections | int | Number of client connections used to connect to Redis. Applicable only if the **sessions.cache** is set to `true` and **sessions.cache_backend** is set to `redis`. | `50` |
| sessions.redis.host | string | Hostname of a Redis instance. Applicable only if the **sessions.cache** is set to `true` and **sessions.cache_backend** is set to `redis`. | `"localhost"` |
| sessions.redis.password | string | Password used to connect to Redis. Applicable only if the **sessions.cache** is set to `true` and **sessions.cache_backend** is set to `redis`. | `"nil"` |
| sessions.redis.port | int | Port used by Redis to accept connections. Applicable only if the **sessions.cache** is set to `true` and **sessions.cache_backend** is set to `redis`. | `6379` |
| sessions.redis.username | string | Username used to connect to Redis. Applicable only if the **sessions.cache** is set to `true` and **sessions.cache_backend** is set to `redis`. | `"nil"` |
| sessions.scg.cleanup_outdated_service.check_period | int | Timeout in seconds to check for outdated service sessions. | `86400` |
| sessions.scg.cleanup_outdated_service.enabled | bool | Enables the cleanup of service sessions older than the given period of time. | `false` |
| sessions.scg.cleanup_outdated_service.limit | int | Limit of outdated sessions to query and delete from the database at once. If the value is set to `0`, all the outdated service sessions are deleted. | `0` |
| sessions.scg.cleanup_outdated_service.older_than | string | Specifies the time after which service sessions are considered outdated and removed from the database. The value of this configuration option consists of two parts separated by a dash: a number of units and a time unit. The following time units are supported: second(s), minute(s), hour(s), day(s), week(s), month(s), and year(s). Applicable only if the **sessions.scg.cleanup_outdated_service.enabled** is set to `true.` | `"7-days"` |
| sessions.scg.cleanup_outdated_service.query_timeout | int | Timeout in seconds for executing the outdated service sessions cleanup query. | `60` |
| sessions.scg.keepalive_timeout | int | Service sessions keepalive period in seconds. Applicable only in the old environments with vSCG. | `5400` |
| sessions.scg.update_nat_binding_on_interim | bool | Updates NAT-Binding in service sessions on RADIUS Accounting-Update requests. Applicable only in the old environments with vSCG. | `true` |
| sessions.store_ip_within_network_sessions | bool | Stores allocated Framed IP addresses only within a network sessions table without using a separate IP table. | `false` |

For more information, see the [Session managment](https://docs.cennso.com/components/tposs/6.16/configuration/session.md) document.

## SFTP container configuration

TPOSS provides the `sftp` access using an optional `sftp` container the external billing systems can access to fetch CDRs.
You can configure the `sftp` container using the following configuration options:

| Key | Type | Description | Default |
|---|---|---|---|
| sftp.enabled | bool | Enables CDR SFTP exporter. | `false` |
| sftp.image.pullPolicy | string | SFTP [image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy). | `"IfNotPresent"` |
| sftp.image.repository | string | SFTP image repository. | `"registry.cennso.com/tposs/tposs-cdr-exporter-sftp"` |
| sftp.image.tag | string | SFTP image tag. | `"v1.1.0"` |
| sftp.service.loadBalancerIP | string | IP of a load balancer. | `""` |
| sftp.service.port | int | Exposed SFTP port. | `2287` |
| sftp.service.type | string | Kubernetes service type. For more information, see the [official documentation](https://kubernetes.io/docs/concepts/services-networking/service/). | `"LoadBalancer"` |
| sftp.sftpConfig.password | string | Password of the SFTP user generated by the `openssl passwd {PASSWORD}` command. | `"password"` |

For more information, see the [SFTP settings](https://docs.cennso.com/components/tposs/6.16/configuration/charging.md#sftp-settings) section.

## TPOSS HTTP API configuration

The following table lists configurable parameters for the [TPOSS HTTP API](https://docs.cennso.com/components/tposs/6.16/api-reference/api.md):

| Key | Type | Description | Default |
|---|---|---|---|
| tposs_http_api.acceptors | int | Number of listener processes that may accept connections. | `100` |
| tposs_http_api.host | string | TPOSS HTTP listener address. | `"0.0.0.0"` |
| tposs_http_api.port | int | TPOSS HTTP listener port. | `8080` |
| tposs_http_api.secret_keys | string | List of secrets to access TPOSS HTTP API. | `"clientid-secret, tt-secret"` |

## TPOSS Ingress configuration

The following table lists configurable parameters for the TPOSS [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/):

| Key | Type | Description | Default |
|---|---|---|---|
| tposs_ingress.annotations | object | Annotations for the Ingress object. | `{}` |
| tposs_ingress.enabled | bool | Enables [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) for TPOSS. | `true` |
| tposs_ingress.host | string | Ingress host for TPOSS. | `"localhost"` |
| tposs_ingress.ingressClassName | string | Ingress class name. | `"nginx"` |

## IMEISV whitelist configuration

The following table lists configurable parameters for the IMEISV whitelist configuration:

| Key | Type | Description | Default |
|---|---|---|---|
| whitelist.imei.default.access_class | string | Name of Access-Class that is used for a subscriber with IMEI which is not in the whitelist. | `"FactoryTest"` |
| whitelist.imei.default.service_profile | string | Special service provider used for a subscriber with IMEI which is not in the whitelist. | `"DE"` |
| whitelist.imei.enabled | bool | Enables whitelisting. | `false` |

For more information, see the [IMEISV whitelist configuration](https://docs.cennso.com/components/tposs/6.16/configuration/imeisv.md) document.
