Assorted changes

- Update deleteConnectionPooler to include role
- Rename EnableMasterConnectionPooler back to original name for backward
  compatiility
- other minor chnages and code improvements
This commit is contained in:
Rafia Sabih
2020-09-03 16:01:25 +02:00
parent 503082cf1a
commit 1814342dc3
17 changed files with 54 additions and 53 deletions
+7 -7
View File
@@ -607,16 +607,16 @@ def update_postgresql(namespace: str, cluster: str):
spec['volume'] = {'size': size}
if 'enableMasterConnectionPooler' in postgresql['spec']:
cp = postgresql['spec']['enableMasterConnectionPooler']
if 'enableConnectionPooler' in postgresql['spec']:
cp = postgresql['spec']['enableConnectionPooler']
if not cp:
if 'enableMasterConnectionPooler' in o['spec']:
del o['spec']['enableMasterConnectionPooler']
if 'enableConnectionPooler' in o['spec']:
del o['spec']['enableConnectionPooler']
else:
spec['enableMasterConnectionPooler'] = True
spec['enableConnectionPooler'] = True
else:
if 'enableMasterConnectionPooler' in o['spec']:
del o['spec']['enableMasterConnectionPooler']
if 'enableConnectionPooler' in o['spec']:
del o['spec']['enableConnectionPooler']
if 'enableReplicaConnectionPooler' in postgresql['spec']:
cp = postgresql['spec']['enableReplicaConnectionPooler']