These docs are for v4.6. Click to read the latest docs for v2023.

Implementing Flags with TimescaleDB

TimescaleDB is an extension of Postgres that is required for the Flags feature. It is recommended to use the Virtual Machine/EC2 installation for TimescaleDB instead of using Helm.

We have included two different ways for the Timescale implementation:

  1. Primary/Secondary servers with replication
  2. Single Server implementation.

We recommend using Primary/Secondary for production-level environments and the Single Server for non-production environments. The TimescaleDB implementation is stored in the TimescaleDB folder, such as https://github.com/codecov/enterprise-resources/tree/master/google_kubernetes_engine/timescaledb.

Primary/Secondary Servers

We have created a template that will create two virtual machines and will run everything required for TimescaleDB, except for setting the password for the Postgres user. If you want to enable Primary/Secondary Servers, add a value of “true” to the config.auto.tfvars for timescale_server_replication_enabled config value. This creates 2 VMs that will replicate from a primary server to a secondary server. Also, we have configured pgBackRest to perform full and incremental backups to a storage account. You will need to update the timeseries_database_url config value and set it to the primary server (example: postgres://username:pw@primaryserver:5432) and update the timeseries_enabled config value to “true” in the codecov.yml file to allow enable the feature.

Single Server

We have created a template that will create a virtual machine and will run everything required for TimescaleDB, except for setting the password for the Postgres user. If you want to enable Single Server Implementation, add a value of “false” to the config.auto.tfvars for timescale_server_replication_enabled config value. Also, we have configured pgBackRest to perform full and incremental backups to a storage account. You will need to update the timeseries_database_url config value (example: postgres://username:pw@server:5432) and update the timeseries_enabled config value to “true” in the codecov.yml file to enable the feature.

Managed Service

TimescaleDB also offers a managed service. This can be used if you wish to abstract management burdens.

Helm and Kubernetes

TimescaleDB offers a helm chart for usage with Kubernetes. This method of deployment is not supported by the Codecov team but can be used to deploy TimescaleDB in your cluster.