@_xtribe/cli 1.0.0-beta.18 → 1.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install-tribe.js +26 -10
- package/package.json +1 -1
package/install-tribe.js
CHANGED
|
@@ -558,20 +558,36 @@ async function deployTribeCluster() {
|
|
|
558
558
|
let nodeReady = false;
|
|
559
559
|
for (let i = 0; i < 20; i++) {
|
|
560
560
|
try {
|
|
561
|
-
|
|
561
|
+
// First check if any nodes exist
|
|
562
|
+
const nodeList = execSync(`${kubectlPath} get nodes -o json`, {
|
|
562
563
|
encoding: 'utf8',
|
|
563
|
-
env: env
|
|
564
|
-
|
|
564
|
+
env: env,
|
|
565
|
+
stdio: 'pipe'
|
|
566
|
+
});
|
|
565
567
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
const nodes = JSON.parse(nodeList);
|
|
569
|
+
if (nodes.items && nodes.items.length > 0) {
|
|
570
|
+
// Now check if the node is ready
|
|
571
|
+
const nodeStatus = execSync(`${kubectlPath} get nodes -o jsonpath='{.items[0].status.conditions[?(@.type=="Ready")].status}'`, {
|
|
572
|
+
encoding: 'utf8',
|
|
573
|
+
env: env,
|
|
574
|
+
stdio: 'pipe'
|
|
575
|
+
}).trim();
|
|
576
|
+
|
|
577
|
+
if (nodeStatus === 'True') {
|
|
578
|
+
nodeReady = true;
|
|
579
|
+
spinner.text = 'Kubernetes node is ready';
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
} catch (error) {
|
|
584
|
+
// Ignore errors - node might not be registered yet or connection issues
|
|
585
|
+
if (error.message && error.message.includes('connection reset')) {
|
|
586
|
+
spinner.text = `Waiting for Kubernetes node... (${i+1}/20) - reconnecting...`;
|
|
587
|
+
} else {
|
|
588
|
+
spinner.text = `Waiting for Kubernetes node... (${i+1}/20)`;
|
|
570
589
|
}
|
|
571
|
-
} catch {
|
|
572
|
-
// Node might not be registered yet
|
|
573
590
|
}
|
|
574
|
-
spinner.text = `Waiting for Kubernetes node... (${i+1}/20)`;
|
|
575
591
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
576
592
|
}
|
|
577
593
|
|