mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 21:25:28 +02:00
set secret name template via config map
This commit is contained in:
+6
-3
@@ -331,9 +331,12 @@ func (c *Cluster) credentialSecretName(username string) string {
|
||||
func (c *Cluster) credentialSecretNameForCluster(username string, clusterName string) string {
|
||||
// secret must consist of lower case alphanumeric characters, '-' or '.',
|
||||
// and must start and end with an alphanumeric character
|
||||
return fmt.Sprintf(constants.UserSecretTemplate,
|
||||
strings.Replace(username, "_", "-", -1),
|
||||
clusterName)
|
||||
|
||||
return c.OpConfig.SecretNameTemplate.Format(
|
||||
"username", strings.Replace(username, "_", "-", -1),
|
||||
"clustername", clusterName,
|
||||
"tprkind", constants.TPRKind,
|
||||
"tprgroup", constants.TPRGroup)
|
||||
}
|
||||
|
||||
func (c *Cluster) podSpiloRole(pod *v1.Pod) string {
|
||||
|
||||
Reference in New Issue
Block a user