mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 16:56:00 +02:00
add pooler suffix to DNS annotation of pooler LoadBalancer service (#2188)
* add pooler suffix to DNS annotation of pooler LoadBalancer service * need generatePoolerServiceAnnotations function
This commit is contained in:
+6
-6
@@ -509,9 +509,9 @@ func (c *Cluster) dnsName(role PostgresRole) string {
|
||||
var dnsString, oldDnsString string
|
||||
|
||||
if role == Master {
|
||||
dnsString = c.masterDNSName()
|
||||
dnsString = c.masterDNSName(c.Name)
|
||||
} else {
|
||||
dnsString = c.replicaDNSName()
|
||||
dnsString = c.replicaDNSName(c.Name)
|
||||
}
|
||||
|
||||
// if cluster name starts with teamID we might need to provide backwards compatibility
|
||||
@@ -528,17 +528,17 @@ func (c *Cluster) dnsName(role PostgresRole) string {
|
||||
return dnsString
|
||||
}
|
||||
|
||||
func (c *Cluster) masterDNSName() string {
|
||||
func (c *Cluster) masterDNSName(clusterName string) string {
|
||||
return strings.ToLower(c.OpConfig.MasterDNSNameFormat.Format(
|
||||
"cluster", c.Name,
|
||||
"cluster", clusterName,
|
||||
"namespace", c.Namespace,
|
||||
"team", c.teamName(),
|
||||
"hostedzone", c.OpConfig.DbHostedZone))
|
||||
}
|
||||
|
||||
func (c *Cluster) replicaDNSName() string {
|
||||
func (c *Cluster) replicaDNSName(clusterName string) string {
|
||||
return strings.ToLower(c.OpConfig.ReplicaDNSNameFormat.Format(
|
||||
"cluster", c.Name,
|
||||
"cluster", clusterName,
|
||||
"namespace", c.Namespace,
|
||||
"team", c.teamName(),
|
||||
"hostedzone", c.OpConfig.DbHostedZone))
|
||||
|
||||
Reference in New Issue
Block a user