From 8c6ff2003716a60adc308028b52a9b843cd110cc Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 17 Dec 2024 18:19:02 +0800 Subject: [PATCH] feat(): add nodeSelector and tolerations to cronjob chart --- cronjob/Chart.yaml | 2 +- cronjob/templates/_k8s_cronjob.tpl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cronjob/Chart.yaml b/cronjob/Chart.yaml index 3664822..dd4938d 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: 1.0.1 +version: 1.1.0 appVersion: 1.0.0 tillerVersion: ">=2.14.3" diff --git a/cronjob/templates/_k8s_cronjob.tpl b/cronjob/templates/_k8s_cronjob.tpl index 9bc4020..aee5585 100644 --- a/cronjob/templates/_k8s_cronjob.tpl +++ b/cronjob/templates/_k8s_cronjob.tpl @@ -67,4 +67,12 @@ name: {{ . }} {{- end }} {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 12 }} + {{- end }} {{- end -}}