@@ -94,7 +94,7 @@ postgresql
94
94
.alert.alert-success ( if ='{ progress.masterLabel }' ) PostgreSQL master available, label is attached
95
95
.alert.alert-success ( if ='{ progress.masterLabel && progress.dnsName }' ) PostgreSQL ready: <strong >{ progress.dnsName }</strong >
96
96
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 >
98
98
99
99
.col-lg-3
100
100
help-general( config ='{ opts.config }' )
@@ -110,6 +110,7 @@ postgresql
110
110
111
111
this .progress = {}
112
112
this .progress .requestStatus = ' OK'
113
+ this .progress .pooler = false
113
114
114
115
this .pollProgressTimer = false
115
116
@@ -126,7 +127,6 @@ postgresql
126
127
jQuery .get (
127
128
' ./postgresqls/' + this .cluster_path ,
128
129
).done (data => {
129
- this .progress .pooler = false
130
130
this .progress .postgresql = true
131
131
this .progress .postgresqlManifest = data
132
132
// copy status as we delete later for edit
@@ -169,8 +169,22 @@ postgresql
169
169
}
170
170
171
171
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 => {
173
175
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
+ })
174
188
this .update ()
175
189
})
176
190
}
0 commit comments