From e67c23a5c0e3b1db14a646d5403debc540e7d731 Mon Sep 17 00:00:00 2001 From: yashsinghcodes Date: Tue, 20 Aug 2024 17:54:13 +0530 Subject: [PATCH] fix logic for cert mounting --- functions/onprem/orborus/orborus.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index e4166008..271b3bb1 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -104,8 +104,6 @@ var memcached = os.Getenv("SHUFFLE_MEMCACHED") var tenzirUrl = os.Getenv("SHUFFLE_TENZIR_URL") var apiKey = os.Getenv("AUTH_FOR_ORBORUS") -var certPath = os.Getenv("SHUFFLE_CERT_DIR") - var executionIds = []string{} var namespacemade = false // For K8s @@ -1152,7 +1150,17 @@ func deployWorker(image string, identifier string, env []string, executionReques }, Resources: container.Resources{}, } - + + certPath := "/certs" + + // This is just to test the mounting locally so + // I can control from what source I'm mounting + // the certs to. Default behaviour is: + // /certs:/certs. + if os.Getenv("SHUFFLE_CERT_PATH") != "" { + certPath = os.Getenv("SHUFFLE_CERT_PATH") + } + _, err := os.ReadDir(certPath) if certPath != "" && err == nil {