Add possibility to set max db connections

Since it's an important part of a connection pool configuration, allow
to configure max db connections, that pool will open to a target db.
From this numbers several others (like default pool size, min pool size,
reserve) will be deduced, taking into account desired number of instances.
This commit is contained in:
Dmitrii Dolgov
2020-03-03 15:58:33 +01:00
parent 037d7120ef
commit 918df1461b
9 changed files with 122 additions and 24 deletions
+1
View File
@@ -94,6 +94,7 @@ type ConnectionPool struct {
ConnPoolDefaultMemoryRequest string `name:"connection_pool_default_memory_request" default:"100Mi"`
ConnPoolDefaultCPULimit string `name:"connection_pool_default_cpu_limit" default:"3"`
ConnPoolDefaultMemoryLimit string `name:"connection_pool_default_memory_limit" default:"1Gi"`
MaxDBConnections *int32 `name:"connection_pool_max_db_connections" default:"60"`
}
// Config describes operator config