@@ -94,7 +94,7 @@ postgresql
9494 .alert.alert-success ( if ='{ progress.masterLabel }' ) PostgreSQL master available, label is attached
9595 .alert.alert-success ( if ='{ progress.masterLabel && progress.dnsName }' ) PostgreSQL ready: <strong >{ progress.dnsName }</strong >
9696
97- .alert.alert-success ( if ='{ progress.pooler }' ) Connection pooler deployment created
97+ .alert.alert-success ( if ='{ progress.pooler && this.progress.postgresqlManifest.spec.enableConnectionPooler }' ) Pooler ready: < strong >{ progress.poolerDnsName }</ strong >
9898
9999 .col-lg-3
100100 help-general( config ='{ opts.config }' )
@@ -110,6 +110,7 @@ postgresql
110110
111111 this .progress = {}
112112 this .progress .requestStatus = ' OK'
113+ this .progress .pooler = false
113114
114115 this .pollProgressTimer = false
115116
@@ -126,7 +127,6 @@ postgresql
126127 jQuery .get (
127128 ' ./postgresqls/' + this .cluster_path ,
128129 ).done (data => {
129- this .progress .pooler = false
130130 this .progress .postgresql = true
131131 this .progress .postgresqlManifest = data
132132 // copy status as we delete later for edit
@@ -169,8 +169,22 @@ postgresql
169169 }
170170
171171 if (this .progress .poolerEnabled == true ) {
172- jQuery .get (' ./pooler/' + this .cluster_path ).done (data => {
172+ jQuery .get (
173+ ' ./pooler/' + this .cluster_path ,
174+ ).done (data => {
173175 this .progress .pooler = {" url" : " " }
176+ jQuery .get (
177+ ' ./services/' + this .cluster_path + " -pooler" ,
178+ ).done (data => {
179+ if (data .metadata && data .metadata .annotations && ' zalando.org/dnsname' in data .metadata .annotations ) {
180+ this .progress .poolerDnsName = data .metadata .annotations [' zalando.org/dnsname' ]
181+ } else if (data .metadata && data .metadata .annotations && ' external-dns.alpha.kubernetes.io/hostname' in data .metadata .annotations ) {
182+ this .progress .poolerDnsName = data .metadata .annotations [' external-dns.alpha.kubernetes.io/hostname' ]
183+ } else {
184+ this .progress .poolerDnsName = data .metadata .name + ' .' + data .metadata .namespace
185+ }
186+ this .update ()
187+ })
174188 this .update ()
175189 })
176190 }
0 commit comments