Skip to content

Commit

Permalink
fix: allow lack of global template (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 authored Feb 3, 2025
1 parent a71d7b0 commit c5a6d9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charts/testkube-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ spec:
value: "{{ include "testkube-tw-init.image" . }}"
{{- if .Values.global.testWorkflows.globalTemplate.enabled }}
{{- if .Values.global.testWorkflows.globalTemplate.inline }}
{{- if .Values.global.testWorkflows.globalTemplate.spec }}
- name: TESTKUBE_GLOBAL_WORKFLOW_TEMPLATE_INLINE
{{- if and .Values.global.testWorkflows.globalTemplate.spec (kindIs "map" .Values.global.testWorkflows.globalTemplate.spec) }}
{{- if kindIs "map" .Values.global.testWorkflows.globalTemplate.spec }}
value: {{ toJson .Values.global.testWorkflows.globalTemplate.spec | quote }}
{{- else }}
value: {{ toJson (fromYaml .Values.global.testWorkflows.globalTemplate.spec) | quote }}
{{- end }}
{{- end }}
{{- else }}
- name: TESTKUBE_GLOBAL_WORKFLOW_TEMPLATE_NAME
value: "{{ .Values.global.testWorkflows.globalTemplate.name }}"
Expand Down

0 comments on commit c5a6d9a

Please sign in to comment.