Skip to content

Commit f24f921

Browse files
committed
fix: check for ingress hostname or ip
Signed-off-by: Ivo Yankov <[email protected]>
1 parent 260d41a commit f24f921

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/commands/network.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,12 +851,18 @@ export class NetworkCommand extends BaseCommand {
851851
]);
852852

853853
if (svc && svc.length > 0 && svc[0].status?.loadBalancer?.ingress?.length > 0) {
854+
let shouldContinue = false;
854855
for (let i = 0; i < svc.status.loadBalancer.ingress.length; i++) {
855856
const ingress = svc.status.loadBalancer.ingress[i];
856-
if (ingress.hostname || ingress.ip) {
857-
return;
857+
if (!ingress.hostname && !ingress.ip) {
858+
shouldContinue = true; // try again if there is neither a hostname nor an ip
859+
break;
858860
}
859861
}
862+
if (shouldContinue) {
863+
continue;
864+
}
865+
return;
860866
}
861867

862868
attempts++;

0 commit comments

Comments
 (0)