From a3967b76317e2743aad2f95f86ea8ad15a1ecb26 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Tue, 10 Oct 2023 11:34:01 +0000 Subject: [PATCH] getting worker image from registry --- functions/final-specs/final-specs/shuffle-cm.yaml | 1 + functions/final-specs/final-specs/shuffle-orborus.yaml | 5 +++++ functions/onprem/orborus/orborus.go | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/final-specs/final-specs/shuffle-cm.yaml b/functions/final-specs/final-specs/shuffle-cm.yaml index ad02ad97..1120d99a 100644 --- a/functions/final-specs/final-specs/shuffle-cm.yaml +++ b/functions/final-specs/final-specs/shuffle-cm.yaml @@ -55,6 +55,7 @@ data: IS_KUBERNETES: "true" REGISTRY_URL: "172.17.14.71:5000" #REGISTRY_AUTH: "" + SHUFFLE_KUBERNETES_WORKER: "dhavald055/shuffle-k8s:shuffle-worker-kubernetes" kind: ConfigMap metadata: creationTimestamp: null diff --git a/functions/final-specs/final-specs/shuffle-orborus.yaml b/functions/final-specs/final-specs/shuffle-orborus.yaml index d3b9b713..fd5f0a6f 100644 --- a/functions/final-specs/final-specs/shuffle-orborus.yaml +++ b/functions/final-specs/final-specs/shuffle-orborus.yaml @@ -52,6 +52,11 @@ spec: configMapKeyRef: key: REGISTRY_URL name: env + - name: SHUFFLE_KUBERNETES_WORKER + valueFrom: + configMapKeyRef: + key: SHUFFLE_KUBERNETES_WORKER + name: env image: dhavald055/shuffle-k8s:shuffle-orborus-kubernetes #imagePullPolicy: Never diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index a480b9f4..419f8a38 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -589,7 +589,9 @@ func deployWorker(image string, identifier string, env []string, executionReques env = append(env, fmt.Sprintf("IS_KUBERNETES=%s", os.Getenv("IS_KUBERNETES"))) } - image = "shuffle-worker:v1" //hard coded image name to test locally + image = os.Getenv("SHUFFLE_KUBERNETES_WORKER") + log.Printf("[DEBUG] using worker image:", image) + // image = "shuffle-worker:v1" //hard coded image name to test locally envMap := make(map[string]string) for _, envStr := range env {