Add support for cronjob deployments
This commit is contained in:
parent
557d379c84
commit
e174f013dc
|
@ -1,7 +1,7 @@
|
||||||
# Workload type
|
# Workload type
|
||||||
- variable: workloadType
|
- variable: workloadType
|
||||||
description: "Please specify type of workload to deploy"
|
description: "Please specify type of workload to deploy"
|
||||||
lablel: "Workload Type"
|
label: "Workload Type"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: "Deployment"
|
default: "Deployment"
|
||||||
|
@ -11,6 +11,15 @@
|
||||||
- "Job"
|
- "Job"
|
||||||
- "CronJob"
|
- "CronJob"
|
||||||
|
|
||||||
|
# Cronjob schedule
|
||||||
|
- variable: cronSchedule
|
||||||
|
label: "Cron Schedule"
|
||||||
|
schema:
|
||||||
|
type: cron
|
||||||
|
show_if: [["workloadType", "=", "CronJob"]]
|
||||||
|
default:
|
||||||
|
minute: "5"
|
||||||
|
|
||||||
# Image related
|
# Image related
|
||||||
- variable: image
|
- variable: image
|
||||||
description: "Docker Image Details"
|
description: "Docker Image Details"
|
||||||
|
|
|
@ -12,7 +12,12 @@ spec:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if ne (include "workloadIsCronJob" .) "true" }}
|
||||||
template:
|
template:
|
||||||
|
{{- else }}
|
||||||
|
schedule: {{ .Values.cronSchedule | quote }}
|
||||||
|
jobTemplate:
|
||||||
|
{{- end }}
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 8 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 8 }}
|
||||||
|
|
Loading…
Reference in New Issue