Job constraints configurable
This commit is contained in:
Binary file not shown.
@@ -7,10 +7,9 @@ metadata:
|
|||||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
schedule: {{ .Values.schedule | quote }}
|
schedule: {{ .Values.schedule | quote }}
|
||||||
successfulJobsHistoryLimit: 1
|
{{ with .Values.constraints }}
|
||||||
failedJobsHistoryLimit: 1
|
{{ toYaml . | nindent 2 }}
|
||||||
concurrencyPolicy: Forbid
|
{{- end }}
|
||||||
startingDeadlineSeconds: 120
|
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
suite: test cron job
|
||||||
|
templates:
|
||||||
|
- cronJob.yaml
|
||||||
|
tests:
|
||||||
|
- it: Should have default constraints
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.successfulJobsHistoryLimit
|
||||||
|
value: 1
|
||||||
|
- it: Should constraints be configurable
|
||||||
|
set:
|
||||||
|
constraints:
|
||||||
|
successfulJobsHistoryLimit: 2
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.successfulJobsHistoryLimit
|
||||||
|
value: 2
|
||||||
@@ -27,3 +27,9 @@ affinity: {}
|
|||||||
|
|
||||||
secret:
|
secret:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
constraints:
|
||||||
|
successfulJobsHistoryLimit: 1
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
startingDeadlineSeconds: 120
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user