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

# TPOSS chart configuration

This document describes configurable parameters of the TPOSS chart. For more detailed example of TPOSS cluster configuration, see the [Configuration for high availability](https://docs.cennso.com/components/tposs/6.14/use-cases/availability-cases/tposs-ha.md) document.

The TPOSS chart has optional dependency - TPOSS API Gateway chart. The [TPOSS API Gateway configuration](https://docs.cennso.com/components/tposs/6.14/configuration/api-gw-configuration.md) document describes the available configuration options of the TPOSS API Gateway chart.

The following table lists the common configurable parameters of the TPOSS chart and their default values:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| replicacount | Number of TPOSS replicas | `1`
| image.repository | Repository with the TPOSS image | `registry.cennso.com/tposs/tposs`
| image.tag | TPOSS image tag | `v6.14.0`
| image.pullPolicy | TPOSS image pull policy | `IfNotPresent`
| imagePullSecrets | Image Pull Secrets for the TPOSS StatefulSet | `[]`
| service.type | TPOSS service type | `ClusterIP`
| annotations | TPOSS StatefulSet annotations | `{}`
| labels | TPOSS StatefulSet labels | `{}`
| podIP.enabled | If enabled, pod IP is used as a name of the Erlang node | `false`
| affinity | TPOSS StatefulSet pods affinity | `{}`
| topologySpreadConstraints | TPOSS pods topology spread constraints | `{}`
| tolerations | TPOSS pods tolerations | `[]`
| persistence.enabled | Enables PVC for TPOSS | `true`
| persistence.accessMode | PVC access mode | `ReadWriteOnce`
| persistence.size | PVC size | `8Gi`
| persistence.storageClass | PVC storage class name | `""`
| persistence.existingClaim | PVC existing claim name | `""`
| tposs_useEmptyDir | Creates an [emptydir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume for storing closed CDRs | `false`
| balance_chunking.enabled | Enables shared balance per different sessions | `false`
| balance_activation_period | Time in seconds to check future balances | `600`
| tposs_migrate_db_on_start | Executes a database migration on the TPOSS instance start-up | `true`
| tariff.tenant | Associates tariffs with tenant | `int.str.carisp.net`
| tariff.change_time | Tariff time change | `"22:00"`
| log.console.level | Logging level for the TPOSS logger | `info`
| log.console.format | Format of the TPOSS logs. The available formats are `default` and `json`. | `default`
| ipAddr.enabled | Enables static IP address for TPOSS | `false`
| ipAddr.ip | Static IP address | `127.0.0.1`
| resources.memory_limit | TPOSS memory limit | `2Gi`
| resources.memory_request | TPOSS memory request | `512Mi`
| resources.cpu_limit | TPOSS CPU limit | `1000m`
| resources.cpu_request | TPOSS CPU request | `250m`
| tposs_elixir_erl_options | Extra parameters for the BEAM virtual machine. The value of this configuration option is set in the **ELIXIR_ERL_OPTIONS** environment variable. | `""`
| terminationGracePeriodSeconds | Termination grace period in seconds | `30`
| ccs.cache.enabled | Enables caching of charging data during the session creation | `false`

## Database clients configuration

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

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| database.name | Database name | `tposs`
| database.user | Database client user name | `tposs`
| database.password | Password for a client | `tposs`
| database.host | Database server endpoint | `127.0.0.1:3306`
| database.driver | Database driver | `mysql`
| database.ssl | Enables secure SSL/TLS database connections | `false`
| database.ssl_versions | SSL/TLS protocol version for a database connection | `tlsv2`
| database.recbuf | Database TCP buffer size | `87380`
| database.timeout | Database connection timeout | `30000`
| database.connections | Number of connections within a database pool | `10`
| database.queue_target | Timeout in milliseconds that specifies how long to wait for a free connection from the database connection pool | `50`
| database.query_histogram_buckets | The values configure the upper limits for round trip time intervals of database queries. The limits are translated into Prometheus histogram buckets. The values are provided in milliseconds. | `"5, 20, 50, 100, 250, 500"`
| database.queue_histogram_buckets | The values configure the upper limits of time intervals that queries spent in the queue. The limits are translated into Prometheus histogram buckets. The values are provided in milliseconds. | `"1, 5, 20, 50, 100, 200"`

## RADIUS configuration

The following table lists configurable parameters for RADIUS communication:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| radius.resend_timeout | Timeout in seconds that specifies how long to store a response in a cache | `5000`
| radius.rtt_histogram_buckets | The values configure the upper limits for time intervals of handling incoming RADIUS requests. The limits are translated into Prometheus histogram buckets. The values are provided in milliseconds. | `"10, 30, 50, 75, 100, 1000, 2000"`
| radius.ggsn_creation_on_accounting | Allows for creating network sessions on Accounting requests | `false`
| radius.recbuf | Size of receive buffer in bytes | `"204800"`
| radius.auth_source.ggsn | Allowed RADIUS clients for GGSN Authentication requests | `proxy:secret@0.0.0.0`
| radius.auth_source.scg | Allowed RADIUS clients for GGSN Accounting requests | `proxy:secret@0.0.0.0`
| radius.acct_source.ggsn | Allowed RADIUS clients for SCG Authentication requests | `proxy:secret@0.0.0.0`
| radius.acct_source.scg | Allowed RADIUS clients for SCG Accounting requests | `proxy:secret@0.0.0.0`
| radius.auth_identify_by.enabled | Enables identification of SCG Authentication requests | `false`
| radius.auth_identify_by.identified_by | Specifies how to identify SCG Authentication requests. The possible values are `nas_id` and `ip`. | `nas_id`
| radius.auth_identify_by.nas_ids | List of regular expressions for NAS-ID-based identification | `"^SCG$, SCG-1, SCG-2"`
| radius.acct_identify_by.enabled | Enables identification of SCG Accounting requests | `false`
| radius.acct_identify_by.identified_by | Specifies how to identify SCG Accounting requests. The possible values are `nas_id` and `ip`. | `nas_id`
| radius.acct_identify_by.nas_ids | List of regular expressions for NAS-ID-based identification | `"^SCG$, SCG-1, SCG-2"`
| radius.auth_listen | RADIUS Authentication listener endpoint | `0.0.0.0:1812`
| radius.acct_listen | RADIUS Accounting listener endpoint | `0.0.0.0:1813`
| radius.connect_coa | List of RADIUS CoA/Disconnect endpoint | `secret@0.0.0.0:3799`
| radius.monitoring_user | RADIUS monitoring user username | `monitoringuser`
| radius.monitoring_password | RADIUS monitoring user password | `secret`
| scg.radius_endpoints.${ID}.nas_id | NAS-Identifier of an SCG instance. The `ID` is a unique identifier to identify an SCG instance. | `scg_one`
| scg.radius_endpoints.${ID}.uri | RADIUS endpoint of an SCG RADIUS Accounting server. The `ID` is a unique identifier to identify an SCG instance. | `secret@127.0.0.1:1813`

## Diameter configuration

The following table lists configurable parameters for Diameter communication:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| scg.diameter.enabled | Enables Diameter support | `false`
| scg.diameter.listener | TPOSS Diameter listener | `"aaa://localhost:3868"`
| scg.diameter.realm | TPOSS Origin-Realm | `"tpip.net"`
| scg.diameter.asr_timeout | Timeout in milliseconds for Diameter Gy-ASR requests | `30000`
| scg.diameter.rar_timeout | Timeout in milliseconds for Diameter Gx-RAR requests | `30000`
| scg.diameter.recbuf | Size of the Diameter receive buffer | `"212992"`
| scg.diameter.sndbuf | Size of the Diameter send buffer | `"212992"`
| scg.diameter.buffer | Size of the in-memory buffer for Diameter requests/responses | `425984`
| scg.diameter.enable_cgnat | Enables the CG-NAT support | `false`
| scg.diameter.wait_time_gy_terminate | Timeout in seconds that specifies how long to wait for the Gy termination requests | `10`
| scg.diameter.pool_size | Number of connections accepted by the Diameter server | `1`
| scg.diameter.rtt_buckets | The values configure the upper limits for time intervals of handling incoming Diameter requests. The limits are translated into Prometheus histogram buckets. The values are provided in milliseconds. | `"10, 30, 50, 75, 100, 1000, 2000"`
| scg.creation_on_nasreq | Allows for creating service sessions based on Diameter NASREQ requests | `false`
| scg.userdata_on_nasreq | Returns user data on a NASREQ-AAR response | `false`

## Rating groups and charging rules configuration

The following table lists configurable parameters for charging rules that are used to charge user traffic:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| scg.adc_rules.online | Name for the Online rating group | `Online`
| scg.adc_rules.portal | Name for the Portal rating group | `Portal`
| scg.adc_rules.b2binternet | Name for the B2BInternet rating group | `B2BInternet`
| scg.adc_rules.non_whitelisted_imei | Name for the FactoryTest rating group | `FactoryTest`
| scg.adc_rules.unlimited_streaming | Name for the UnlimitedStreaming rating group | `UnlimitedStreaming`
| scg.adc_rules.unlimited_streaming_pd | Name for the UnlimitedStreamingPD rating group | `UnlimitedStreamingPD`
| scg.adc_rules.online_redirection | Name for the OnlineRedirection rating group | `OnlineRedirection`
| scg.rating_groups.online | Value of the Online rating group | `1000`
| scg.rating_groups.portal | Value of the Portal rating group | `2000`
| scg.rating_groups.non_whitelisted_imei | Value of the FactoryTest rating group | `2100`
| scg.rating_groups.unlimited_streaming | Value of the UnlimitedStreaming rating group | `3000`
| scg.rating_groups.unlimited_streaming_pd | Value of the UnlimitedStreamingPD rating group | `3100`
| scg.rating_groups.b2binternet | Value of the B2BInternet rating group | `3225`
| scg.rating_groups.online_redirection | Value of the OnlineRedirection rating group | `4000`
| scg.rating_groups_validity_time.online | Validity time in seconds for the Online rating group | `180`
| scg.rating_groups_validity_time.portal | Validity time in seconds for the Portal rating group | `180`
| scg.rating_groups.validity_time.b2binternet | Validity time in seconds for the B2BInternet rating group | `180`
| scg.rating_groups_validity_time.non_whitelisted_imei | Validity time in seconds for the FactoryTest rating group | `180`
| scg.rating_groups_validity_time.unlimited_streaming | Validity time in seconds for the UnlimitedStreaming rating group | `180`
| scg.rating_groups_validity_time.unlimited_streaming_pd | Validity time in seconds for the UnlimitedStreamingPD rating group | `180`
| scg.rating_groups_validity_time.online_redirection | Validity time in seconds for the OnlineRedirection rating group | `180`
| scg.unlimited_streaming.enabled | Enables UnlimitedStreaming and UnlimitedStreamingPD rating groups | `true`
| scg.b2b_internet_quota | Traffic quota that is allocated for subscribers with the B2BInternet charging rule | `1073741824`

If the Diameter support is not enabled in TPOSS (using the **scg.diameter.enabled** parameter), you can apply the following access classes for the service sessions:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| scg.rules.authenticated | Name for the Portal Access-Class | `Portal` |
| scg.rules.authorized | Name for the Online Access-Class | `Online` |
| scg.rules.unknown | Name for the Unknown Access-Class | `Known` |

## IP pools and service profiles configuration

This table lists TPOSS IP pools and service profiles configuration:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| ippools | List of IP pools | `{}` |
| ippools_selectors | List of IP pools selectors | `{}` |
| profiles | List of service profiles | `{}` |

The configuration of IP pools consists of two parts:

- IP pools configuration
- Service profile configuration

### IP pools configuration 

This is the example of the IP pools configuration:

```yaml
ippools:
  wan_ip_range:
    range: "10.192.0.0-10.193.255.254"
    blocks: 20
    allow_to_decrease_number_of_blocks: false
    initial_active_blocks: 1
    reactivate: 90
    mark_inactive: 100
    packed: 75

ippools_selectors:
  wan_ip_range: "Called-Station-Id:apn.example.com"
```

- **wan_ip_range** - the name of a pool which defines certain IP range from where IPs are allocated.
- **blocks** - the number of sub-blocks into which the IP pool is split. The IP blocks are distributed over TPOSS instances within a cluster.
- **allow_to_decrease_number_of_blocks** - the boolean value that provides the ability to decrease the number of blocks. TPOSS ignores the new number of blocks if the value of **allow_to_decrease_number_of_blocks** is set to `false` and the new number of blocks is lower than the previous one. In such a case, the original number of blocks is used.
- **mark_inactive** - the percentage of block usage after which the block is marked as `inactive`. After the block is marked as `inactive`, TPOSS does not allocate IPs from this block anymore but only populates it back when IPs are released.
- **packed** - the percentage of used IPs from a given block after which TPOSS tries to pre-fetch a new block of IP addresses.
- **reactivate** -  the percentage of busy IPs within the inactive block after which the IP block that previously was marked as `inactive` is marked as `active` again and TPOSS continues to use it.
- **initial_active_blocks** - the number of blocks to activate initially per instance (use this to spread ip-usage over the range).

The **ippools_selectors** parameter contains the mapping between pool names and their selectors based on the RADIUS attribute and its value.

### Service profile configuration 

To allocate the Framed-IP-Address, you must specify which pool to use. Each subscriber has an associated service profile that specifies a pool. Service profiles are provisioned by TPOSS during start-up. You can specify them using this configuration option:

```yaml
profiles:
 DE:
   zone_id: MOBILE
   nat_pool_id: pool-de
   ippools: wan_ip_range
   primary_dns: 8.8.8.8
   secondary_dns: 8.8.8.8
   selector: "Called-Station-Id:apn.example.com"
   precendence: 0
   subscriber_required: true
```

The **DE** key represents `homecountry` and must be unique. If you need multiple service profiles with the same `homecountry`, the service profile keys must be unique. For example, the following service profiles definition is incorrect:

```yaml
profiles:
  DE:
    ...
  DE:
    ...
```

If you need to use the same `homecountry` for multiple service profiles, provide `homecountry` in the **name** parameter. See the example:

```yaml
profiles:
  DE-1:
    name: "DE"
    zone_id: MOBILE
    nat_pool_id: pool-de-1
    ippools: wan_ip_range-1
    selector: "Called-Station-Id:apn1.example.com"
    precendence: 0
    subscriber_required: true
  DE-2:
    name: "DE"
    zone_id: MOBILE
    nat_pool_id: pool-de-2
    ippools: wan_ip_range-2
    selector: "Called-Station-Id:apn2.example.com"
    precendence: 0
    subscriber_required: true
```

For more examples, see the [High availability](https://docs.cennso.com/components/tposs/6.14/use-cases/availability-cases/tposs-ha.md#service-profiles-configuration) document.

## PCS sessions configuration

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

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| sessions.ggsn.keepalive_timeout | GGSN sessions keepalive period in seconds | `5400` |
| sessions.ggsn.imeisv_required | Specifies if 3GPP-IMEISV is a mandatory RADIUS attribute | `false` |
| sessions.ggsn.default_imeisv | Default value of 3GPP-IMEISV, in case the value is not passed in a RADIUS request | `nil` |
| sessions.ggsn.disconnect_without_framed_ip.enabled | 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 | 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.enabled** is `true` | `0` |
| sessions.scg.keepalive | Service sessions keepalive period in seconds | `5400` |
| sessions.scg.update_nat_binding_on_interim | Updates NAT-Binding in service sessions on RADIUS Accounting-Update requests | `true` |
| sessions.backend | Storage backend for PCS sessions | `mnesia` |
| sessions.cache | Enables in-memory cache for PCS sessions | `false` |
| sessions.cache_backend | Specifies a cache backend for PCS sessions. The possible values are `ets` and `redis`. | `ets` |
| sessions.redis.host | Hostname of a Redis instance | `"localhost"` |
| sessions.redis.port | Port used by Redis to accept connections | `6379` |
| sessions.redis.username | Username used to connect to Redis | `nil` |
| sessions.redis.password | Password used to connect to Redis | `nil` |
| sessions.redis.connections | Number of client connections used to connect to Redis | `50` |
| sessions.idle_timer_enabled | Enables the idle timer for PCS sessions | `true` |
| sessions.global_lock_enabled | Enables the global lock for sessions across TPOSS nodes within the TPOSS cluster | `true` |
| sessions.store_ip_within_network_sessions | Store allocated Framed IP addresses only within a network sessions table | `false` |
| scg.zone_id | SCG zone ID | `"MOBILE"` |
| scg.interim_interval | Interval in seconds for RADIUS Accounting-Update requests for service sessions | `60` |

## CDRs controllers configuration

The following table lists configurable parameters to control the behavior of CDRs:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| cdr.controller.database.enabled | Enables CDR database controller | `false`
| cdr.controller.database.partitions_enabled | Enables partitioning for a CDR table | `false`
| cdr.controller.database.initial_partitions_amount | Number of partitions that are initially created | `24`
| cdr.controller.database.partitions_duration | Time duration to consider partition as active | `1-day`
| cdr.controller.database.new_partitions_amount | Number of partitions to create when the last partition becomes active | `8`
| cdr.controller.database.watcher_timeout | 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 | `300000`
| cdr.controller.database.cdr_cleanup_period | CDRs which were closed before this period are removed from 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). | `14-days`
| cdr.controller.database.cdr_cleanup_limit | If partitions are disabled, this configuration option specifies a limit of deletion of outdated CDRs. By default, it is set to `all`. Any integer number can be specified. | `all`
| cdr.controller.database.cdr_cleanup_query_timeout | If partitions are disabled, this configuration option specifies timeout for a database query to cleanup outdated CDRs | `60000`
| cdr.controller.database.clean_up_partitions_at | Time when to trigger event to drop outdated CDR partitions | `""`
| cdr.controller.file.enabled | Enables CDR file controller | `false`
| cdr.controller.file.dir | Directory where CDR files are stored | `/srv/data/cdrs`
| cdr.controller.file.time_window | Time to rotate a CDR file in seconds | `60`
| cdr.controller.file.max_count | Number of closed CDRs that can be written into one file before rotation | `10`
| cdr.controller.file.file_name_format | A format of a file name where closed CDRs are stored | `tposs_{start_at:ISO8601:UTC:STRIPPED}_{batch_id}_{sha256}.csv`

## Hooks configuration

TPOSS supports a set of events. You can enable or disable each of them. If you enable an event, provide a pre-configured endpoint to TPOSS for sending events.

The following table lists the configurable parameters related to the `hooks`:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| hooks.visited_country_changed.enabled | Enable visited country changed notification | `false`
| hooks.visited_country_changed.event | Event name | `tposs/location/visitedCountry/updated`
| hooks.visited_country_changed.attempts | Number of attempts for sending failed country changed notifications | `3`
| hooks.visited_country_changed.delay | Delay in milliseconds between attempts | `300`
| hooks.visited_country_changed.url | Endpoint of hooks handler | `http://localhost:8086/test/consumer`
| hooks.visited_country_changed.proxy.enabled | Enables a proxy server to send country changed notifications over | `false`
| hooks.visited_country_changed.proxy.addr | Address of a proxy server | `http://localhost:8086`
| hooks.mccmnc_changed.enabled | Enables MCC-MNC notifications | `false`
| hooks.mccmnc_changed.event | Event name | `tposs/location/mccmnc/updated`
| hooks.mccmnc_changed.attempts | Number of attempts for sending failed MCC-MNC notifications | `3`
| hooks.mccmnc_changed.delay | Delay in milliseconds between attempts | `300`
| hooks.mccmnc_changed.url | Endpoint of hooks handler | `http://localhost:8086/test/consumer`
| hooks.mccmnc_changed.proxy.enabled | Enables a proxy server to send MCC-MNC notifications over | `false`
| hooks.mccmnc_changed.proxy.addr | Address of a proxy server | `http://localhost:8086`
| hooks.balance_volume_threshold.enabled | Enables balance volume threshold notifications | `false`
| hooks.balance_volume_threshold.event | Event name | `tposs/charging/balance/updated`
| hooks.balance_volume_threshold.level | Level of used balance when notifications should be sent. It takes the value between `0.0` and `1.0`. | `0.8`
| hooks.balance_volume_threshold.attempts | Number of attempts for sending failed balance volume threshold notifications | `3`
| hooks.balance_volume_threshold.delay | Delay in milliseconds between attempts | `300`
| hooks.balance_volume_threshold.url | Endpoint of hooks handler | `http://localhost:8086/test/consumer`
| hooks.balance_volume_threshold.proxy.enabled | Enables a proxy server to send balance volume threshold notifications over | `false`
| hooks.balance_volume_threshold.proxy.addr | Address of a proxy server | `http://localhost:8086`
| hooks.network_attachment.first.enabled | Enables the first network attachment notifications | `false`
| hooks.network_attachment.first.event | Event name | `tposs/network/attachment/first`
| hooks.network_attachment.first.attempts | Number of attempts for sending failed first network attachment notifications | `3`
| hooks.network_attachment.first.delay | Delay in milliseconds between attempts | `300`
| hooks.network_attachment.first.url | Endpoint of hooks handler | `http://localhost:8086/test/consumer`
| hooks.network_attachment.first.proxy.enabled | Enables a proxy server to send first network attachment notifications over | `false`
| hooks.network_attachment.first.proxy.addr | Address of a proxy server | `http://localhost:8086`
| hooks.charging_rules_changed.enabled | Enables charging rules change notifications | `false`
| hooks.charging_rules_changed.event | Event name | `tposs/charging_rules/changed`
| hooks.charging_rules_changed.attempts | Number of attempts for sending failed charging rules change notifications | `3`
| hooks.charging_rules_changed.delay | Delay in milliseconds between attempts | `300`
| hooks.charging_rules_changed.url | Endpoint of hooks handler | `http://localhost:8086/test/consumer`
| hooks.charging_rules_changed.mcc_whitelist | List of Mobile Country Codes separated by comma for which the `Mobile Country Code Change` event is triggered | `""`

For more information, see the [High availability](https://docs.cennso.com/components/tposs/6.14/use-cases/availability-cases/tposs-ha.md) document.

## IMEISV whitelist configuration

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

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

For more information, see the [High availability](https://docs.cennso.com/components/tposs/6.14/use-cases/availability-cases/tposs-ha.md#imeisv-whitelist-configuration) 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:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| servicemonitor.enabled | Enables ServiceMonitor | `false` |
| servicemonitor.interval | Metrics scrape interval | `30s` |
| servicemonitor.scrapeTimeout | Metrics scrape timeout | `30s` |
| servicemonitor.labels | ServiceMonitor labels | `release: prometheus-operator` |
| servicemonitor.annotations | ServiceMonitor annotations | `{}` |
| servicemonitor.targetLabels | ServiceMonitor target labels | `[]` |
| servicemonitor.namespaceSelector | ServiceMonitor namespace selector | `{}` |
| servicemonitor.selector.matchLabels | ServiceMonitor selector labels | `app: tposs` |

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.14/troubleshooting.md#reinitialize-the-sessions_ggsn-metric).

### Debug container with network utilities

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

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| networkUtility.enabled | Enables the debug container with network utilities | `false`
| networkUtility.image.repository | Network utilities image repository | `quay.io/travelping/nettools`
| networkUtility.image.tag | Network utilities image tag | `v1.12.0`
| networkUtility.image.pullPolicy | Network utilities pull policy | `IfNotPresent`

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

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

## SFTP container configuration

TPOSS provides `sftp` access using an optional `sftp` container which can be accessed by external billing system to fetch CDRs.
You can configure the `sftp` container using the following configuration options:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| sftp.enabled | Enables CDR SFTP exporter | `false`
| sftp.image.repository | SFTP image repository | `registry.cennso.com/tposs/tposs-cdr-exporter-sftp`
| sftp.image.tag | SFTP image tag | `v1.1.0`
| sftp.image.pullPolicy | SFTP image pull policy | `IfNotPresent`
| sftp.service.type | Service type | `LoadBalancer`
| sftp.service.port | Exposed SFTP port | `2287`
| sftp.service.loadBalancerIP | IP of a load balancer | `""`
| sftp.sftpConfig.password | Password of the SFTP user generated by the `openssl passwd {PASSWORD}` command | `password`

## TPOSS Ingress configuration

The following table lists configurable parameters for the TPOSS Ingress configuration:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| tposs_ingress.enabled | Enables Ingress for TPOSS | `true` |
| tposs_ingress.host | Ingress host for TPOSS | `localhost` |
| tposs_ingress.annotations | Annotations for ingress object | `{}` |
| tposs_ingress.ingressClassName | Ingress class name | `"nginx"` |

## TPOSS HTTP API configuration

The following table lists configurable parameters for the TPOSS HTTP API configuration:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| tposs_http_api.host | TPOSS HTTP listener | `0.0.0.0` |
| tposs_http_api.port | TPOSS HTTP listener port | `8080` |
| tposs_http_api.acceptors | Number of HTTP acceptors | `100` |
| tposs_http_api.secret_keys | TPOSS HTTP secret keys | `"clientid-secret, tt-secret"` |

## TPOSS init script configuration

The following table lists configurable parameters for the TPOSS init script configuration:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| initScript.enabled | Enables the init script before the start of the TPOSS instance | `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.env | Environment variables with which the init script is launched | `{}` |
| initScript.script | The script code itself | `echo "missing configuration script"` |

## 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:

| Parameter | Description | Default value |
| :--- | :--- | :--- |
| probes.enabled | Live and healthcheck probes | `true` |
| probes.liveness.initialDelaySeconds | Number of seconds before the first liveness probe is triggered | `15` |
| probes.liveness.timeoutSeconds | Number of seconds after which the liveness probe times out | `3` |
| probes.liveness.periodSeconds | Number of seconds after which the liveness probe is repeated | `10` |
| probes.liveness.failureThreshold | Number of failed liveness probes after which the whole check is failed | `3` |
| probes.readiness.initialDelaySeconds | Number of seconds before the first readiness probe is triggered | `20` |
| probes.readiness.timeoutSeconds | Number of seconds after which the readiness probe times out | `3` |
| probes.readiness.periodSeconds | Number of seconds after which the readiness probe is repeated | `10` |
| probes.readiness.failureThreshold | Number of failed readiness probes after which the whole check is failed | `3` |
