Use named arguments in the DNS name format

This commit is contained in:
Murat Kabilov
2017-05-18 17:23:59 +02:00
committed by GitHub
parent 3b6454c2dc
commit 95a57d1e4f
4 changed files with 41 additions and 19 deletions
+4 -5
View File
@@ -245,11 +245,10 @@ func (c *Cluster) labelsSet() labels.Set {
}
func (c *Cluster) dnsName() string {
return strings.ToLower(fmt.Sprintf(
c.OpConfig.DNSNameFormat,
c.Spec.ClusterName,
c.teamName(),
c.OpConfig.DbHostedZone))
return strings.ToLower(c.OpConfig.DNSNameFormat.Format(
"cluster", c.Spec.ClusterName,
"team", c.teamName(),
"hostedzone", c.OpConfig.DbHostedZone))
}
func (c *Cluster) credentialSecretName(username string) string {