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