File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,13 @@ if (output.items.length === 0) {
13
13
process . exit ( 1 ) ;
14
14
}
15
15
for ( const item of output . items ) {
16
- const ipAddr = item . status . loadBalancer ?. ingress ?. [ 0 ] ?. ip ;
17
- if ( ipAddr ) {
18
- console . log ( "load balancer external IP address:" , ipAddr ) ;
16
+ const name = item . metadata . name ;
17
+ const namespace = item . metadata . namespace ;
18
+ const status = item . status ;
19
+ const addr = status ?. loadBalancer ?. ingress ?. [ 0 ] ?. ip || status ?. loadBalancer ?. ingress ?. [ 0 ] ?. hostname ;
20
+ if ( addr ) {
21
+ console . log ( `load balancer “${ name } ” in namespace “${ namespace } ” external address: ${ addr } ` ) ;
19
22
} else {
20
- console . log ( " load balancer not running yet:" , output . status . loadBalancer ) ;
23
+ console . log ( ` load balancer “ ${ name } ” in namespace “ ${ namespace } ” not running yet:` , status ) ;
21
24
}
22
25
}
You can’t perform that action at this time.
0 commit comments