From 4b8a32153e3b506555ccc5c69d912790d7a8da5c Mon Sep 17 00:00:00 2001 From: paulobressan Date: Tue, 12 Dec 2023 10:10:32 -0300 Subject: [PATCH] docs: updated readme --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4f6a9c5..3012731 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,30 @@ This project is a Kubernetes custom controller to create users on dbsync's Postgres. This controller defines a new CRD DbSyncPort on Kubernetes and when the new users enable the External Dbsync, the Demiter will generate a manifest with the kind DbSyncPort and the controller will be watching for creating a new user on Postgres. +> [!IMPORTANT] +> The metrics collector uses the `pg_stat_statements` extension enabled on Postgres. To enable that extension follow the steps bellow. + +- set pg_stat_statements at `shared_preload_libraries` on postgresql.conf + ``` + shared_preload_libraries = 'pg_stat_statements' + ``` +- create the extension on postgres + ``` + CREATE EXTENSION IF NOT EXISTS pg_stat_statements; + ``` + ## Environment -| Key | Value | -| -------------- | ------------------------------------- | -| ADDR | 0.0.0.0:5000 | -| DB_URL_MAINNET | postgres://user:password@host:post/db | -| DB_URL_PREPROD | postgres://user:password@host:post/db | -| DB_URL_PREVIEW | postgres://user:password@host:post/db | +| Key | Value | +| ---------------------- | ------------------------------------- | +| ADDR | 0.0.0.0:5000 | +| DB_URL_MAINNET | postgres://user:password@host:post/db | +| DB_URL_PREPROD | postgres://user:password@host:post/db | +| DB_URL_PREVIEW | postgres://user:password@host:post/db | +| METRICS_DELAY | 30 | +| DCU_PER_SECOND_MAINNET | 10 | +| DCU_PER_SECOND_PREPROD | 10 | +| DCU_PER_SECOND_PREVIEW | 10 | ## Commands