| 22 | ) |
| 23 | |
| 24 | func (c *Controller) makeClusterConfig() cluster.Config { |
| 25 | infrastructureRoles := make(map[string]spec.PgUser) |
| 26 | for k, v := range c.config.InfrastructureRoles { |
| 27 | infrastructureRoles[k] = v |
| 28 | } |
| 29 | |
| 30 | return cluster.Config{ |
| 31 | RestConfig: c.config.RestConfig, |
| 32 | OpConfig: config.Copy(c.opConfig), |
| 33 | PgTeamMap: &c.pgTeamMap, |
| 34 | InfrastructureRoles: infrastructureRoles, |
| 35 | PodServiceAccount: c.PodServiceAccount, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func (c *Controller) clusterWorkerID(clusterName spec.NamespacedName) uint32 { |
| 40 | workerID, ok := c.clusterWorkers[clusterName] |