mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 18:33:02 +02:00
Optimize template constant
This commit is contained in:
+1
-3
@@ -257,9 +257,7 @@ func (c *Cluster) credentialSecretName(username string) string {
|
||||
// and must start and end with an alphanumeric character
|
||||
return fmt.Sprintf(constants.UserSecretTemplate,
|
||||
strings.Replace(username, "_", "-", -1),
|
||||
c.Metadata.Name,
|
||||
constants.TPRName,
|
||||
constants.TPRVendor)
|
||||
c.Metadata.Name)
|
||||
}
|
||||
|
||||
func (c *Cluster) deleteEtcdKey() error {
|
||||
|
||||
@@ -12,7 +12,7 @@ const (
|
||||
K8sApiPath = "/api"
|
||||
DataVolumeName = "pgdata"
|
||||
PasswordLength = 64
|
||||
UserSecretTemplate = "%s.%s.credentials.%s.%s" // Username, ClusterName, TPRName, TPRVendor
|
||||
UserSecretTemplate = "%s.%s.credentials." + TPRName + "." + TPRVendor // Username, ClusterName
|
||||
ZalandoDnsNameAnnotation = "external-dns.alpha.kubernetes.io/hostname"
|
||||
ElbTimeoutAnnotationName = "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout"
|
||||
ElbTimeoutAnnotationValue = "3600"
|
||||
|
||||
Reference in New Issue
Block a user