MCPcopy Create free account
hub / github.com/zalando/postgres-operator / makeClusterConfig

Method makeClusterConfig

pkg/controller/util.go:24–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22)
23
24func (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
39func (c *Controller) clusterWorkerID(clusterName spec.NamespacedName) uint32 {
40 workerID, ok := c.clusterWorkers[clusterName]

Callers 1

addClusterMethod · 0.95

Calls 1

CopyFunction · 0.92

Tested by

no test coverage detected