Optimize template constant
This commit is contained in:
		
							parent
							
								
									fd449342e5
								
							
						
					
					
						commit
						18700b9ef7
					
				|  | @ -257,9 +257,7 @@ func (c *Cluster) credentialSecretName(username string) string { | ||||||
| 	// and must start and end with an alphanumeric character
 | 	// and must start and end with an alphanumeric character
 | ||||||
| 	return fmt.Sprintf(constants.UserSecretTemplate, | 	return fmt.Sprintf(constants.UserSecretTemplate, | ||||||
| 		strings.Replace(username, "_", "-", -1), | 		strings.Replace(username, "_", "-", -1), | ||||||
| 		c.Metadata.Name, | 		c.Metadata.Name) | ||||||
| 		constants.TPRName, |  | ||||||
| 		constants.TPRVendor) |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) deleteEtcdKey() error { | func (c *Cluster) deleteEtcdKey() error { | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ const ( | ||||||
| 	K8sApiPath                = "/api" | 	K8sApiPath                = "/api" | ||||||
| 	DataVolumeName            = "pgdata" | 	DataVolumeName            = "pgdata" | ||||||
| 	PasswordLength            = 64 | 	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" | 	ZalandoDnsNameAnnotation  = "external-dns.alpha.kubernetes.io/hostname" | ||||||
| 	ElbTimeoutAnnotationName  = "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout" | 	ElbTimeoutAnnotationName  = "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout" | ||||||
| 	ElbTimeoutAnnotationValue = "3600" | 	ElbTimeoutAnnotationValue = "3600" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue