master configmap has leader suffix
This commit is contained in:
		
							parent
							
								
									d643ad5e21
								
							
						
					
					
						commit
						22b6abcf95
					
				|  | @ -77,7 +77,15 @@ func (c *Cluster) statefulSetName() string { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) configMapName(role PostgresRole) string { | func (c *Cluster) configMapName(role PostgresRole) string { | ||||||
| 	return c.serviceName(role) | 	name := c.Name | ||||||
|  | 	if role == Master { | ||||||
|  | 		name = name + "-leader" | ||||||
|  | 	} | ||||||
|  | 	if role == Replica { | ||||||
|  | 		name = name + "-repl" | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return name | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) endpointName(role PostgresRole) string { | func (c *Cluster) endpointName(role PostgresRole) string { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue