From e4d1452edd106911f28a9c2339cca4591b248387 Mon Sep 17 00:00:00 2001 From: Avi Moondra Date: Mon, 23 Oct 2023 17:15:10 -0400 Subject: [PATCH] fix tests --- charts/retool/ci/kubeconform-values.yaml | 3 +++ charts/retool/templates/_helpers.tpl | 15 --------------- charts/retool/templates/_validations.tpl | 10 +++++----- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/charts/retool/ci/kubeconform-values.yaml b/charts/retool/ci/kubeconform-values.yaml index 570b7af2..fe2406eb 100644 --- a/charts/retool/ci/kubeconform-values.yaml +++ b/charts/retool/ci/kubeconform-values.yaml @@ -302,3 +302,6 @@ extraManifests: [] securityGroupPolicy: enabled: false groupIds: [] + +internalWorker: + enabled: true diff --git a/charts/retool/templates/_helpers.tpl b/charts/retool/templates/_helpers.tpl index 1c0a5b09..d8dc778c 100644 --- a/charts/retool/templates/_helpers.tpl +++ b/charts/retool/templates/_helpers.tpl @@ -200,18 +200,3 @@ Set code executor service name {{- define "retool.codeExecutor.name" -}} {{ template "retool.fullname" . }}-code-executor {{- end -}} - - -{{/* -Set Worker enabled -Usage: (include "retool.worker.enabled" .) -*/}} -{{- define "retool.worker.enabled" -}} -{{- $output := "" -}} -{{- if or (include "retool.workflows.enabled" .) (.Values.internalWorker.enabled) -}} - {{- $output = "1" -}} -{{- else -}} - {{- $output = "" -}} -{{- end -}} -{{- $output -}} -{{- end -}} diff --git a/charts/retool/templates/_validations.tpl b/charts/retool/templates/_validations.tpl index 2c40a8d9..38d39374 100644 --- a/charts/retool/templates/_validations.tpl +++ b/charts/retool/templates/_validations.tpl @@ -1,7 +1,7 @@ {{/* Compile all validation warnings into a single message and call fail. */}} {{- define "retool.validationRules" -}} {{- $messages := list -}} -{{- $messages = append $messages (include "retool.validationRules.workers" .) -}} +{{- $messages = append $messages (include "retool.validationRules.internalWorker" .) -}} {{- $messages = without $messages "" -}} {{- $message := join "\n" $messages -}} {{- if $message -}} @@ -9,9 +9,9 @@ {{- end -}} {{- end -}} -{{- define "retool.validationRules.workers" -}} -{{- if not (or (not (include "retool.worker.enabled" .)) (and (include "retool.worker.enabled" .) (include "retool.temporal.enabled" .))) -}} -workers: - Workers are enabled (via internalWorker.enabled, workflows.enabled explicitly, or workflows.enabled implicitly based on image.tag > 3.6.11), but Temporal is not enabled via retool-temporal-services-helm.enabled or workflows.temporal.enabled +{{- define "retool.validationRules.internalWorker" -}} +{{- if not (or (not (.Values.internalWorker.enabled)) (and (.Values.internalWorker.enabled) (or (include "retool.temporal.enabled" .) (include "retool.workflows.enabled" .)))) -}} +internalWorker: + Internal worker is enabled (via internalWorker.enabled), but Temporal is not enabled via retool-temporal-services-helm.enabled or workflows.temporal.enabled or via Retool's Managed Temporal for Retool Workflows (via workflows.enabled explicitly, or workflows.enabled implicitly based on image.tag > 3.6.11) {{- end -}} {{- end -}}