Skip to content

Commit

Permalink
feat: add support for external global template (#944)
Browse files Browse the repository at this point in the history
* feat: add support for external global template
* fix: add missing default value to testkube-api
* chore: add globalTemplate.external to testkube chart README docs
  • Loading branch information
rangoo94 authored Sep 26, 2024
1 parent a278faa commit 60d2a73
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/testkube-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `""` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.global.testWorkflows.globalTemplate.enabled }}
{{- if and .Values.global.testWorkflows.globalTemplate.enabled (not .Values.global.testWorkflows.globalTemplate.external) }}
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflowTemplate
metadata:
Expand Down
1 change: 1 addition & 0 deletions charts/testkube-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ global:
createOfficialTemplates: true
globalTemplate:
enabled: false
external: false
name: global-template
spec: {}

Expand Down
1 change: 1 addition & 0 deletions charts/testkube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag
| global.testWorkflows.globalTemplate | object | `{"enabled":false,"name":"global-template","spec":{}}` | Global TestWorkflowTemplate that will be automatically included for all executions |
| global.testWorkflows.globalTemplate.enabled | bool | `false` | Is global template enabled |
| global.testWorkflows.globalTemplate.name | string | `"global-template"` | Name of the global template |
| global.testWorkflows.globalTemplate.external | bool | `false` | Is the global template sourced externally? (otherwise it's created from spec below) |
| global.testWorkflows.globalTemplate.spec | object | `{}` | Specification for the global template |
| global.tls.caCertPath | string | `""` | Path to the PEM-encoded CA certificate file (needs to be mounted to the container previously) |
| global.tolerations | list | `[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]` | Tolerations to add to all deployed pods |
Expand Down
2 changes: 2 additions & 0 deletions charts/testkube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 60d2a73

Please sign in to comment.