its pod spec not container spec..

This commit is contained in:
Stavros kois
2023-01-09 18:08:14 +02:00
parent 700259743a
commit 15ddffcdbe
4 changed files with 13 additions and 19 deletions

View File

@@ -120,14 +120,14 @@ tests:
- failedTemplate:
errorMessage: Invalid option (invalid) for <completionMode> in <job> (job-name). Valid options are NonIndexed and Indexed. Leave empty to use the default (NonIndexed)
- it: should fail without containers jobs
set:
jobs:
job-name:
enabled: true
asserts:
- failedTemplate:
errorMessage: At least one container in <containers> is required in <job> (job-name).
# - it: should fail without containers jobs
# set:
# jobs:
# job-name:
# enabled: true
# asserts:
# - failedTemplate:
# errorMessage: At least one container in <containers> is required in <job> (job-name).
- it: should pass with default in job
documentIndex: &jobDoc 3

View File

@@ -27,5 +27,5 @@ service:
# containers:
# containername:
# imageSelector: asdfas
# imageSelector: image
# restartPolicy: Never

View File

@@ -27,13 +27,7 @@ completions: {{ . }}
completionMode: {{ $job.completionMode | default $default.completionMode }}
template:
spec:
{{/*- with (include "ix.v1.common.controller.extraContainers" (dict "root" $root
"containerList" $job.containers
"type" "job") | trim) }}
containers:
{{- . | nindent 6 }}
{{- end -*/}}
{{/* TODO: create the pod/job spec */}}
{{- end -}}
{{/* TODO: create the job spec (containers) */}}
{{/* TODO: Unit Tests */}}

View File

@@ -61,8 +61,8 @@
{{- end -}}
{{- end -}}
{{- if not $job.containers -}}
{{/*- if not $job.containers -}}
{{ fail (printf "At least one container in <containers> is required in <job> (%s)." $name) }}
{{- end -}}
{{- end -}}
{{/* TODO: Unit Tests */}}
{{- end -*/}}
{{/* TODO: Unit Tests / It's pods not containers */}}