Cleanup configuration

Add pool configuration into CRD & charts. Add preliminary documentation.
Rename NumberOfInstances to Replicas like in Deployment. Mention couple
of potential improvement points for connection pool specification.
This commit is contained in:
Dmitrii Dolgov
2020-02-13 13:36:14 +01:00
parent f2c9905123
commit 6dad83325b
15 changed files with 237 additions and 86 deletions
+2 -2
View File
@@ -1861,9 +1861,9 @@ func (c *Cluster) generateConnPoolDeployment(spec *acidv1.PostgresSpec) (
*appsv1.Deployment, error) {
podTemplate, err := c.generateConnPoolPodTemplate(spec)
numberOfInstances := spec.ConnectionPool.NumberOfInstances
numberOfInstances := spec.ConnectionPool.Replicas
if numberOfInstances == nil {
numberOfInstances = c.OpConfig.ConnectionPool.NumberOfInstances
numberOfInstances = c.OpConfig.ConnectionPool.Replicas
}
if err != nil {
+2 -2
View File
@@ -99,14 +99,14 @@ func TestConnPoolSynchronization(t *testing.T) {
oldSpec: &acidv1.Postgresql{
Spec: acidv1.PostgresSpec{
ConnectionPool: &acidv1.ConnectionPool{
NumberOfInstances: int32ToPointer(1),
Replicas: int32ToPointer(1),
},
},
},
newSpec: &acidv1.Postgresql{
Spec: acidv1.PostgresSpec{
ConnectionPool: &acidv1.ConnectionPool{
NumberOfInstances: int32ToPointer(2),
Replicas: int32ToPointer(2),
},
},
},