diff --git a/charts/testkube-api/templates/_job-container-template.yaml.tpl b/charts/testkube-api/templates/_job-container-template.yaml.tpl index 7f38c0fb1..caa63fe85 100644 --- a/charts/testkube-api/templates/_job-container-template.yaml.tpl +++ b/charts/testkube-api/templates/_job-container-template.yaml.tpl @@ -5,6 +5,10 @@ kind: Job metadata: name: "{{`{{ .Name }}`}}" namespace: {{`{{ .Namespace }}`}} + {{- with .Values.jobAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{`{{- if gt .ActiveDeadlineSeconds 0 }}`}} activeDeadlineSeconds: {{`{{ .ActiveDeadlineSeconds }}`}} diff --git a/charts/testkube-api/templates/_job-scraper-template.yaml.tpl b/charts/testkube-api/templates/_job-scraper-template.yaml.tpl index bda8699d8..aa32376d5 100644 --- a/charts/testkube-api/templates/_job-scraper-template.yaml.tpl +++ b/charts/testkube-api/templates/_job-scraper-template.yaml.tpl @@ -5,6 +5,10 @@ kind: Job metadata: name: {{`{{ .Name }}`}}-scraper namespace: {{`{{ .Namespace }}`}} + {{- with .Values.jobAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{`{{- if gt .ActiveDeadlineSeconds 0 }}`}} activeDeadlineSeconds: {{`{{ .ActiveDeadlineSeconds }}`}} diff --git a/charts/testkube-api/templates/_job-template.yaml.tpl b/charts/testkube-api/templates/_job-template.yaml.tpl index 5cf1cca93..836b0a9a0 100644 --- a/charts/testkube-api/templates/_job-template.yaml.tpl +++ b/charts/testkube-api/templates/_job-template.yaml.tpl @@ -5,6 +5,10 @@ kind: Job metadata: name: "{{`{{ .Name }}`}}" namespace: {{`{{ .Namespace }}`}} + {{- with .Values.jobAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{`{{- if gt .ActiveDeadlineSeconds 0 }}`}} activeDeadlineSeconds: {{`{{ .ActiveDeadlineSeconds }}`}} diff --git a/charts/testkube-api/values.yaml b/charts/testkube-api/values.yaml index 6fe901c1e..687813cb0 100644 --- a/charts/testkube-api/values.yaml +++ b/charts/testkube-api/values.yaml @@ -87,6 +87,10 @@ fullnameOverride: "" # set annotations for all workflows. jobPodAnnotations: {} +# jobAnnotations adds annotations to the jobs spawned to execute tests using +# prebuilt and container executors, when using the default job templates. +jobAnnotations: {} + ## Custom job-container-template.yml that will be passed to Testkube API jobContainerTemplate: "" diff --git a/charts/testkube/values.yaml b/charts/testkube/values.yaml index e5bc6f197..dca827d08 100644 --- a/charts/testkube/values.yaml +++ b/charts/testkube/values.yaml @@ -344,6 +344,10 @@ testkube-api: # set annotations for all workflows. jobPodAnnotations: {} + # jobAnnotations adds annotations to the jobs spawned to execute tests using + # prebuilt and container executors, when using the default job templates. + jobAnnotations: {} + # Custom job-container-template.yml that will be passed to Testkube API # jobContainerTemplate: "" #