Skip to content

Commit a07801f

Browse files
authored
fix: ensure network active check supports multi-cluster deployments (#1431)
Signed-off-by: Nathan Klick <[email protected]>
1 parent d113167 commit a07801f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/commands/node/tasks.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ export class NodeCommandTasks {
343343
? 'Please attach JVM debugger now. Sleeping for 1 hour, hit ctrl-c once debugging is complete.'
344344
: '';
345345
const title = `Check network pod: ${chalk.yellow(nodeAlias)} ${chalk.red(reminder)}`;
346+
const context = helpers.extractContextFromConsensusNodes(nodeAlias, ctx.config.consensusNodes);
346347

347348
const subTask = async (ctx: any, task: ListrTaskWrapper<any, any, any>) => {
348349
if (enableDebugger) {
@@ -355,6 +356,10 @@ export class NodeCommandTasks {
355356
title,
356357
i,
357358
status,
359+
undefined,
360+
undefined,
361+
undefined,
362+
context,
358363
);
359364
};
360365

@@ -379,6 +384,7 @@ export class NodeCommandTasks {
379384
maxAttempts = constants.NETWORK_NODE_ACTIVE_MAX_ATTEMPTS,
380385
delay = constants.NETWORK_NODE_ACTIVE_DELAY,
381386
timeout = constants.NETWORK_NODE_ACTIVE_TIMEOUT,
387+
context?: string,
382388
): Promise<PodRef> {
383389
nodeAlias = nodeAlias.trim() as NodeAlias;
384390
const podName = Templates.renderNetworkPodName(nodeAlias);
@@ -397,7 +403,7 @@ export class NodeCommandTasks {
397403

398404
try {
399405
const response = await this.k8Factory
400-
.default()
406+
.getK8(context)
401407
.containers()
402408
.readByRef(ContainerRef.of(podRef, constants.ROOT_CONTAINER))
403409
.execContainer([

0 commit comments

Comments
 (0)