From ca3184efe36b7f1211d23de0acf15369636ab050 Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Wed, 11 Oct 2023 15:24:40 -0400 Subject: [PATCH] make it so you can create a kuberenetes deployment with a file created from --template (#1413) * fix file * fix test --- cloud/deployment/inspect/inspect.go | 3 +++ cloud/deployment/inspect/inspect_test.go | 15 +-------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/cloud/deployment/inspect/inspect.go b/cloud/deployment/inspect/inspect.go index de71f1c9d..126533bce 100644 --- a/cloud/deployment/inspect/inspect.go +++ b/cloud/deployment/inspect/inspect.go @@ -400,6 +400,9 @@ func getTemplate(formattedDeployment *FormattedDeployment) FormattedDeployment { } } template.Deployment.EnvVars = newEnvVars + if template.Deployment.Configuration.Executor == deployment.KubeExecutor { + template.Deployment.WorkerQs = nil + } return template } diff --git a/cloud/deployment/inspect/inspect_test.go b/cloud/deployment/inspect/inspect_test.go index e8bbf1c17..5c4a9a101 100644 --- a/cloud/deployment/inspect/inspect_test.go +++ b/cloud/deployment/inspect/inspect_test.go @@ -1161,20 +1161,7 @@ func TestFormatPrintableDeployment(t *testing.T) { "cloud_provider": "", "region": "" }, - "worker_queues": [ - { - "name": "default", - "worker_type": "test-instance-type", - "pod_cpu": "smallCPU", - "pod_ram": "megsOfRam" - }, - { - "name": "test-queue-1", - "worker_type": "test-instance-type-1", - "pod_cpu": "LotsOfCPU", - "pod_ram": "gigsOfRam" - } - ], + "worker_queues": null, "alert_emails": [ "email1", "email2"