diff --git a/charts/testkube-api/job-container-template.yml.tmpl b/charts/testkube-api/job-container-template.yml.tmpl index 85d56b4bb..6a5588933 100644 --- a/charts/testkube-api/job-container-template.yml.tmpl +++ b/charts/testkube-api/job-container-template.yml.tmpl @@ -29,7 +29,7 @@ spec: mountPath: /etc/certs {{- end }} {{- if .ArtifactRequest }} - {{- if .ArtifactRequest.VolumeMountPath }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} - name: artifact-volume mountPath: {{ .ArtifactRequest.VolumeMountPath }} {{- end }} @@ -78,7 +78,7 @@ spec: mountPath: /etc/certs {{- end }} {{- if .ArtifactRequest }} - {{- if .ArtifactRequest.VolumeMountPath }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} - name: artifact-volume mountPath: {{ .ArtifactRequest.VolumeMountPath }} {{- end }} diff --git a/charts/testkube-api/job-template.yml.tmpl b/charts/testkube-api/job-template.yml.tmpl index 07fca63f7..e35d5c080 100644 --- a/charts/testkube-api/job-template.yml.tmpl +++ b/charts/testkube-api/job-template.yml.tmpl @@ -27,6 +27,12 @@ spec: - name: {{ .CertificateSecret }} mountPath: /etc/certs {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + mountPath: {{ .ArtifactRequest.VolumeMountPath }} + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} @@ -57,6 +63,12 @@ spec: - name: {{ .CertificateSecret }} mountPath: /etc/certs {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + mountPath: {{ .ArtifactRequest.VolumeMountPath }} + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} @@ -77,6 +89,13 @@ spec: secret: secretName: {{ .CertificateSecret }} {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + persistentVolumeClaim: + claimName: {{ .Name }}-pvc + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} diff --git a/charts/testkube-api/pvc-container-template.yml.tmpl b/charts/testkube-api/pvc-template.yml.tmpl similarity index 72% rename from charts/testkube-api/pvc-container-template.yml.tmpl rename to charts/testkube-api/pvc-template.yml.tmpl index 7b1a0a214..7c85aa830 100644 --- a/charts/testkube-api/pvc-container-template.yml.tmpl +++ b/charts/testkube-api/pvc-template.yml.tmpl @@ -6,7 +6,11 @@ metadata: spec: storageClassName: {{ .ArtifactRequest.StorageClassName }} accessModes: + {{- if .ArtifactRequest.SharedBetweenPods }} + - ReadWriteMany + {{- else }} - ReadWriteOnce + {{- end }} resources: requests: storage: 1Gi diff --git a/charts/testkube-api/slave-pod-template.yml.tmpl b/charts/testkube-api/slave-pod-template.yml.tmpl index 22e02fbe5..316f6a7f7 100644 --- a/charts/testkube-api/slave-pod-template.yml.tmpl +++ b/charts/testkube-api/slave-pod-template.yml.tmpl @@ -30,6 +30,12 @@ spec: - name: {{ .CertificateSecret }} mountPath: /etc/certs {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + mountPath: {{ .ArtifactRequest.VolumeMountPath }} + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} @@ -101,6 +107,12 @@ spec: - name: {{ .CertificateSecret }} mountPath: /etc/certs {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + mountPath: {{ .ArtifactRequest.VolumeMountPath }} + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} @@ -121,6 +133,13 @@ spec: secret: secretName: {{ .CertificateSecret }} {{- end }} + {{- if .ArtifactRequest }} + {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} + - name: artifact-volume + persistentVolumeClaim: + claimName: {{ .Name }}-pvc + {{- end }} + {{- end }} {{- range $configmap := .EnvConfigMaps }} {{- if and $configmap.Mount $configmap.Reference }} - name: {{ $configmap.Reference.Name }} diff --git a/charts/testkube-api/templates/configmap.yaml b/charts/testkube-api/templates/configmap.yaml index f1127ef57..c73b50560 100644 --- a/charts/testkube-api/templates/configmap.yaml +++ b/charts/testkube-api/templates/configmap.yaml @@ -22,8 +22,8 @@ data: {{- else }} {{ .Files.Get "job-template.yml.tmpl" | indent 4 }} {{- end }} - pvc-container-template.yml: |- -{{ .Files.Get "pvc-container-template.yml.tmpl" | indent 4 }} + pvc-template.yml: |- +{{ .Files.Get "pvc-template.yml.tmpl" | indent 4 }} slack-config.json: |- {{- if .Values.slackConfig }} {{ toJson .Values.slackConfig | indent 4 }} diff --git a/charts/testkube-operator/templates/tests.testkube.io_testexecutions.yaml b/charts/testkube-operator/templates/tests.testkube.io_testexecutions.yaml index e933f966d..a956cd51f 100644 --- a/charts/testkube-operator/templates/tests.testkube.io_testexecutions.yaml +++ b/charts/testkube-operator/templates/tests.testkube.io_testexecutions.yaml @@ -64,9 +64,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string @@ -431,9 +440,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/charts/testkube-operator/templates/tests.testkube.io_tests.yaml b/charts/testkube-operator/templates/tests.testkube.io_tests.yaml index 97b6c25db..006b57ddf 100644 --- a/charts/testkube-operator/templates/tests.testkube.io_tests.yaml +++ b/charts/testkube-operator/templates/tests.testkube.io_tests.yaml @@ -462,9 +462,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/charts/testkube-operator/templates/tests.testkube.io_testsuiteexecutions.yaml b/charts/testkube-operator/templates/tests.testkube.io_testsuiteexecutions.yaml index 28c8b4cd5..449538a17 100644 --- a/charts/testkube-operator/templates/tests.testkube.io_testsuiteexecutions.yaml +++ b/charts/testkube-operator/templates/tests.testkube.io_testsuiteexecutions.yaml @@ -277,6 +277,13 @@ spec: items: description: execution result returned from executor properties: + duration: + description: step duration + type: string + endTime: + description: step end time + format: date-time + type: string execute: items: description: execution result returned from executor @@ -304,10 +311,20 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean storageBucket: description: artifact bucket storage type: string @@ -752,6 +769,10 @@ spec: type: object type: object type: array + startTime: + description: step start time + format: date-time + type: string step: description: set of steps run in parallel properties: @@ -849,10 +870,19 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/charts/testkube-operator/templates/tests.testkube.io_testsuites.yaml b/charts/testkube-operator/templates/tests.testkube.io_testsuites.yaml index bc743d454..054c353fc 100644 --- a/charts/testkube-operator/templates/tests.testkube.io_testsuites.yaml +++ b/charts/testkube-operator/templates/tests.testkube.io_testsuites.yaml @@ -576,6 +576,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: @@ -614,6 +619,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: @@ -818,6 +828,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: