From 0c31b5160312146018e1810464f75c61bc49956c Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Thu, 16 Nov 2023 12:50:04 -0300 Subject: [PATCH 1/3] fix(orchestrator): Apply the x-infra-instance to fileserver pod --- .../packages/orchestrator/src/providers/k8s/kubeClient.ts | 3 ++- .../packages/orchestrator/static-configs/fileserver-pod.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts index c34691ef0..5656d27da 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts @@ -545,7 +545,6 @@ export class KubeClient extends Client { type: "deployment", files: [ settings.backchannel ? "backchannel-pod.yaml" : null, - "fileserver-pod.yaml", ], }, ]; @@ -557,6 +556,8 @@ export class KubeClient extends Client { } // wait until fileserver is ready, fix race condition #700. + const xinfra = process.env.X_INFRA_INSTANCE || "ondemand"; + await this.createStaticResource("fileserver-pod.yaml", this.namespace, { xinfra }); await this.waitPodReady("fileserver"); sleep(3 * 1000); let fileServerOk = false; diff --git a/javascript/packages/orchestrator/static-configs/fileserver-pod.yaml b/javascript/packages/orchestrator/static-configs/fileserver-pod.yaml index e39b23384..b90695c6f 100644 --- a/javascript/packages/orchestrator/static-configs/fileserver-pod.yaml +++ b/javascript/packages/orchestrator/static-configs/fileserver-pod.yaml @@ -4,7 +4,8 @@ "metadata": { "name": "fileserver", "labels": { - "app": "fileserver" + "app": "fileserver", + "x-infra-instance": "{{xinfra}}" } }, "spec": { From 7fd95ddbf1001f21f1d0d6635c286083a0456576 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Thu, 16 Nov 2023 12:55:43 -0300 Subject: [PATCH 2/3] add xinfra to words --- javascript/words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/javascript/words.txt b/javascript/words.txt index 2b95ab864..754a1cc05 100644 --- a/javascript/words.txt +++ b/javascript/words.txt @@ -175,6 +175,7 @@ westend westmint willbe xcmp +xinfra xzvf zipkin zndsl From dda3c51b39d85a2daaeca8dfc07d958a1508c382 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Thu, 16 Nov 2023 13:10:24 -0300 Subject: [PATCH 3/3] fmt --- .../packages/orchestrator/src/providers/k8s/kubeClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts index 5656d27da..dc840b9f1 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts @@ -543,9 +543,7 @@ export class KubeClient extends Client { }, { type: "deployment", - files: [ - settings.backchannel ? "backchannel-pod.yaml" : null, - ], + files: [settings.backchannel ? "backchannel-pod.yaml" : null], }, ]; @@ -557,7 +555,9 @@ export class KubeClient extends Client { // wait until fileserver is ready, fix race condition #700. const xinfra = process.env.X_INFRA_INSTANCE || "ondemand"; - await this.createStaticResource("fileserver-pod.yaml", this.namespace, { xinfra }); + await this.createStaticResource("fileserver-pod.yaml", this.namespace, { + xinfra, + }); await this.waitPodReady("fileserver"); sleep(3 * 1000); let fileServerOk = false;