defaultTablespaces adds the tablespace owner where the user didn't specify it
()
| 166 | // defaultTablespaces adds the tablespace owner where the |
| 167 | // user didn't specify it |
| 168 | func (r *Cluster) defaultTablespaces() { |
| 169 | defaultOwner := r.GetApplicationDatabaseOwner() |
| 170 | if len(defaultOwner) == 0 { |
| 171 | defaultOwner = "postgres" |
| 172 | } |
| 173 | |
| 174 | for name, tablespaceConfiguration := range r.Spec.Tablespaces { |
| 175 | if len(tablespaceConfiguration.Owner.Name) == 0 { |
| 176 | tablespaceConfiguration.Owner.Name = defaultOwner |
| 177 | } |
| 178 | r.Spec.Tablespaces[name] = tablespaceConfiguration |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | // defaultMonitoringQueries adds the default monitoring queries configMap |
| 183 | // if not already present in CustomQueriesConfigMap |
no test coverage detected