Job constraints configurable
This commit is contained in:
Binary file not shown.
@@ -7,10 +7,9 @@ metadata:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
schedule: {{ .Values.schedule | quote }}
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
concurrencyPolicy: Forbid
|
||||
startingDeadlineSeconds: 120
|
||||
{{ with .Values.constraints }}
|
||||
{{ toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
jobTemplate:
|
||||
spec:
|
||||
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:
|
||||
enabled: false
|
||||
|
||||
constraints:
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
concurrencyPolicy: Forbid
|
||||
startingDeadlineSeconds: 120
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user