From 02bba8f111cc8da5d8da1d8a5b7962a30cd923c7 Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Thu, 26 Sep 2024 15:38:24 +0200 Subject: [PATCH] feat: add support for external global template --- charts/testkube-api/README.md | 1 + .../testworkflows/builtin-templates/global-template.yaml | 2 +- charts/testkube/values.yaml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/testkube-api/README.md b/charts/testkube-api/README.md index 1aadf9383..85d8b8cc8 100644 --- a/charts/testkube-api/README.md +++ b/charts/testkube-api/README.md @@ -84,6 +84,7 @@ A Helm chart for Testkube api | global.testWorkflows.createOfficialTemplates | bool | `true` | | | global.testWorkflows.createServiceAccountTemplates | bool | `true` | | | global.testWorkflows.globalTemplate.enabled | bool | `false` | | +| global.testWorkflows.globalTemplate.external | bool | `false` | | | global.testWorkflows.globalTemplate.name | string | `"global-template"` | | | global.testWorkflows.globalTemplate.spec | object | `{}` | | | global.tls.caCertPath | string | `""` | | diff --git a/charts/testkube-api/templates/testworkflows/builtin-templates/global-template.yaml b/charts/testkube-api/templates/testworkflows/builtin-templates/global-template.yaml index 8815865ee..7d585d46b 100644 --- a/charts/testkube-api/templates/testworkflows/builtin-templates/global-template.yaml +++ b/charts/testkube-api/templates/testworkflows/builtin-templates/global-template.yaml @@ -1,4 +1,4 @@ -{{- if .Values.global.testWorkflows.globalTemplate.enabled }} +{{- if and .Values.global.testWorkflows.globalTemplate.enabled (not .Values.global.testWorkflows.globalTemplate.enabled) }} apiVersion: testworkflows.testkube.io/v1 kind: TestWorkflowTemplate metadata: diff --git a/charts/testkube/values.yaml b/charts/testkube/values.yaml index 7e81ba113..58b47b776 100644 --- a/charts/testkube/values.yaml +++ b/charts/testkube/values.yaml @@ -56,6 +56,8 @@ global: enabled: false # -- Name of the global template name: global-template + # -- Is the global template sourced externally? (otherwise it's created from spec below) + external: false # -- Specification for the global template spec: {} # spec: