From 4ba48b018cbbb7b136cd134ed77b6211914f5fa0 Mon Sep 17 00:00:00 2001 From: Donggeun Lee Date: Tue, 4 May 2021 19:56:08 +0900 Subject: [PATCH] Add tolerations to cronjob in helm chart --- charts/descheduler/README.md | 1 + charts/descheduler/templates/cronjob.yaml | 4 ++++ charts/descheduler/values.yaml | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/charts/descheduler/README.md b/charts/descheduler/README.md index befab7a88..bd0bc9775 100644 --- a/charts/descheduler/README.md +++ b/charts/descheduler/README.md @@ -63,3 +63,4 @@ The following table lists the configurable parameters of the _descheduler_ chart | `serviceAccount.create` | If `true`, create a service account for the cron job | `true` | | `serviceAccount.name` | The name of the service account to use, if not set and create is true a name is generated using the fullname template | `nil` | | `nodeSelector` | Node selectors to run the descheduler cronjob on specific nodes | `nil` | +| `tolerations` | tolerations to run the descheduler cronjob on specific nodes | `nil` | \ No newline at end of file diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index 21a2829f3..57985e7fe 100644 --- a/charts/descheduler/templates/cronjob.yaml +++ b/charts/descheduler/templates/cronjob.yaml @@ -37,6 +37,10 @@ spec: nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} diff --git a/charts/descheduler/values.yaml b/charts/descheduler/values.yaml index 7d5e69f22..0b907b152 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -61,6 +61,12 @@ priorityClassName: system-cluster-critical nodeSelector: {} # foo: bar +tolerations: [] +# - key: 'management' +# operator: 'Equal' +# value: 'tool' +# effect: 'NoSchedule' + rbac: # Specifies whether RBAC resources should be created create: true