Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi Moondra authored and Avi Moondra committed Oct 23, 2023
1 parent 1ba2002 commit e4d1452
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
3 changes: 3 additions & 0 deletions charts/retool/ci/kubeconform-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,6 @@ extraManifests: []
securityGroupPolicy:
enabled: false
groupIds: []

internalWorker:
enabled: true
15 changes: 0 additions & 15 deletions charts/retool/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
10 changes: 5 additions & 5 deletions charts/retool/templates/_validations.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{{/* 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 -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
{{- 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 -}}

0 comments on commit e4d1452

Please sign in to comment.