use min instances 2 everywhere and update reference docs

This commit is contained in:
Felix Kunde 2020-03-20 11:31:49 +01:00
parent 7a9d898af7
commit 1ca8028fa5
8 changed files with 21 additions and 14 deletions

View File

@ -341,7 +341,8 @@ spec:
#default: "transaction"
connection_pool_number_of_instances:
type: integer
#default: 1
minimum: 2
#default: 2
connection_pool_default_cpu_limit:
type: string
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'

View File

@ -120,7 +120,7 @@ spec:
- "transaction"
numberOfInstances:
type: integer
minimum: 1
minimum: 2
resources:
type: object
required:

View File

@ -258,7 +258,7 @@ configConnectionPool:
# default pooling mode
connection_pool_mode: "transaction"
# number of pooler instances
connection_pool_number_of_instances: 1
connection_pool_number_of_instances: 2
# default resources
connection_pool_default_cpu_request: "1"
connection_pool_default_memory_request: "100Mi"

View File

@ -604,25 +604,29 @@ but do not specify some of the parameters. All of them are optional with the
operator being able to provide some reasonable defaults.
* **connection_pool_number_of_instances**
How many instances of connection pool to create.
How many instances of connection pool to create. Default is 2 which is also
the required minimum.
* **connection_pool_schema**
Schema to create for credentials lookup function.
Schema to create for credentials lookup function. Default is `pooler`.
* **connection_pool_user**
User to create for connection pool to be able to connect to a database.
Default is `pooler`.
* **connection_pool_image**
Docker image to use for connection pool deployment.
Default: "registry.opensource.zalan.do/acid/pgbouncer:master-5"
* **connection_pool_max_db_connections**
How many connections the pooler can max hold.
How many connections the pooler can max hold. Default is 60.
* **connection_pool_mode**
Default pool mode, session or transaction.
Default pool mode, `session` or `transaction`. Default is `transaction`.
* **connection_pool_default_cpu_request**
**connection_pool_default_memory_reques**
**connection_pool_default_cpu_limit**
**connection_pool_default_memory_limit**
Default resource configuration for connection pool deployment.
Default resource configuration for connection pool deployment. The internal
default for memory limit and request is `100Mi`, for CPU it is `1`.

View File

@ -18,7 +18,7 @@ data:
connection_pool_image: "registry.opensource.zalan.do/acid/pgbouncer:master-5"
# connection_pool_max_db_connections: 60
# connection_pool_mode: "transaction"
# connection_pool_number_of_instances: 1
# connection_pool_number_of_instances: 2
# connection_pool_schema: "pooler"
# connection_pool_user: "pooler"
# custom_service_annotations: "keyx:valuez,keya:valuea"

View File

@ -317,7 +317,8 @@ spec:
#default: "transaction"
connection_pool_number_of_instances:
type: integer
#default: 1
minimum: 2,
#default: 2
connection_pool_default_cpu_limit:
type: string
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'

View File

@ -84,7 +84,7 @@ spec:
- "transaction"
numberOfInstances:
type: integer
minimum: 1
minimum: 2
resources:
type: object
required:

View File

@ -105,6 +105,7 @@ var OperatorConfigCRDResourceColumns = []apiextv1beta1.CustomResourceColumnDefin
var min0 = 0.0
var min1 = 1.0
var min2 = 2.0
var minDisable = -1.0
// PostgresCRDResourceValidation to check applied manifest parameters
@ -198,7 +199,7 @@ var PostgresCRDResourceValidation = apiextv1beta1.CustomResourceValidation{
},
"numberOfInstances": {
Type: "integer",
Minimum: &min1,
Minimum: &min2,
},
"resources": {
Type: "object",
@ -491,7 +492,7 @@ var PostgresCRDResourceValidation = apiextv1beta1.CustomResourceValidation{
Type: "string",
},
"tls": {
Type: "object",
Type: "object",
Required: []string{"secretName"},
Properties: map[string]apiextv1beta1.JSONSchemaProps{
"secretName": {
@ -1166,7 +1167,7 @@ var OperatorConfigCRDResourceValidation = apiextv1beta1.CustomResourceValidation
},
"connection_pool_number_of_instances": {
Type: "integer",
Minimum: &min1,
Minimum: &min2,
},
"connection_pool_schema": {
Type: "string",