diff --git a/charts/ix-chart/2009.0.1/questions.yaml b/charts/ix-chart/2009.0.1/questions.yaml index 89752e9bba5..53a53d3f0c6 100644 --- a/charts/ix-chart/2009.0.1/questions.yaml +++ b/charts/ix-chart/2009.0.1/questions.yaml @@ -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" diff --git a/charts/ix-chart/2009.0.1/templates/deployment.yaml b/charts/ix-chart/2009.0.1/templates/deployment.yaml index ba216f7df47..a7f8398b4d5 100644 --- a/charts/ix-chart/2009.0.1/templates/deployment.yaml +++ b/charts/ix-chart/2009.0.1/templates/deployment.yaml @@ -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 }}