diff --git a/cronjob/Chart.yaml b/cronjob/Chart.yaml index ff1b070..c6a273b 100644 --- a/cronjob/Chart.yaml +++ b/cronjob/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 description: Helm chart with simple cronjob template name: cronjob -version: 0.6.4 +version: 0.7.0 appVersion: 0.0.1 tillerVersion: ">=2.14.3" diff --git a/cronjob/templates/_argo_cron_workflow.tpl b/cronjob/templates/_argo_cron_workflow.tpl index 7bc8d3b..59884fe 100644 --- a/cronjob/templates/_argo_cron_workflow.tpl +++ b/cronjob/templates/_argo_cron_workflow.tpl @@ -1,16 +1,32 @@ {{- define "cronjob.argo_cron_workflow" -}} workflowSpec: + podMetadata: + labels: + name: {{ .Values.name }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key | quote }} : {{ $value | quote }} + {{- end }} workflowMetadata: labels: name: {{ .Values.name }} - {{- range $key, $value := .Values.annotations }} - {{ $key | quote }} : {{ $value | quote }} - {{- end }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key | quote }} : {{ $value | quote }} + {{- end }} {{- if .Values.serviceaccount }} serviceAccountName: {{ .Values.serviceaccount.name | default (printf "%s-pod-service-account" .Values.name) }} {{- else if .Values.serviceAccount }} serviceAccountName: {{ .Values.name }}-pod-service-account {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 6 }} + {{- end }} # If .Values.job.timeout equal to null, the pod will be kill ONLY the job is done. Otherwise, the pod will kill after the value you set {{- if and (.Values.job) (.Values.job.timeout) }} activeDeadlineSeconds: {{.Values.job.timeout }} @@ -89,11 +105,6 @@ - name: template metadata: namespace: {{ .Release.Namespace }} - annotations: - cronjob_name: {{ .Values.name }} - {{- range $key, $value := .Values.annotations }} - {{ $key | quote }} : {{ $value | quote }} - {{- end }} container: image: '{{ required "image.repository must be provided" .Values.image.repository }}:{{ required "image.tag must be provided" .Values.image.tag }}' {{- if .Values.command }} diff --git a/cronjob/values.yaml b/cronjob/values.yaml index 0c7c7e9..833d9e3 100644 --- a/cronjob/values.yaml +++ b/cronjob/values.yaml @@ -155,4 +155,15 @@ pdb: enable: false # Note: You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget, and if you setting both will only set maxUnavailable. # minAvailable: 9999 - # maxUnavailable: 0 \ No newline at end of file + # maxUnavailable: 0 + +nodeSelector: {} +# nodeSelector: +# nodegroup: ec-eks-db-cpu-node-autoscaling-group + +tolerations: [] +# tolerations: +# - key: "shop-callback-node" +# operator: "Equal" +# value: "true" +# effect: "NoSchedule" \ No newline at end of file