Prepare the database for connection pooler to be used, i.e. install lookup function (do it first, because it should be fast and if it didn't succeed, it doesn't makes sense to create more K8S objects. At this moment we assume that necessary connection pooler user exists. After that create all the o
(LookupFunction InstallFunction)
| 157 | // add these cp related functions to a new cp file |
| 158 | // opConfig, cluster, and database name |
| 159 | func (c *Cluster) createConnectionPooler(LookupFunction InstallFunction) (SyncReason, error) { |
| 160 | var reason SyncReason |
| 161 | c.setProcessName("creating connection pooler") |
| 162 | |
| 163 | //this is essentially sync with nil as oldSpec |
| 164 | if reason, err := c.syncConnectionPooler(&acidv1.Postgresql{}, &c.Postgresql, LookupFunction); err != nil { |
| 165 | return reason, err |
| 166 | } |
| 167 | return reason, nil |
| 168 | } |
| 169 | |
| 170 | // Generate pool size related environment variables. |
| 171 | // |