From 03852d091404816c72fdca495060a11f8792fb1d Mon Sep 17 00:00:00 2001 From: Sean Malloy Date: Tue, 24 Nov 2020 00:16:38 -0600 Subject: [PATCH] Update Helm Chart To Allow Setting startingDeadlineSeconds Allow end users to optionally set the descheduler CronJob .spec.startingDeadlineSeconds when installing using helm. --- charts/descheduler/README.md | 1 + charts/descheduler/templates/cronjob.yaml | 3 +++ charts/descheduler/values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/charts/descheduler/README.md b/charts/descheduler/README.md index 7df42c0c85..9bb5581fe6 100644 --- a/charts/descheduler/README.md +++ b/charts/descheduler/README.md @@ -51,6 +51,7 @@ The following table lists the configurable parameters of the _descheduler_ chart | `nameOverride` | String to partially override `descheduler.fullname` template (will prepend the release name) | `""` | | `fullnameOverride` | String to fully override `descheduler.fullname` template | `""` | | `schedule` | The cron schedule to run the _descheduler_ job on | `"*/2 * * * *"` | +| `startingDeadlineSeconds` | If set, configure `startingDeadlineSeconds` for the _descheduler_ job | `nil` | | `cmdOptions` | The options to pass to the _descheduler_ command | _see values.yaml_ | | `deschedulerPolicy.strategies` | The _descheduler_ strategies to apply | _see values.yaml_ | | `priorityClassName` | The name of the priority class to add to pods | `system-cluster-critical` | diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index 6b8bbec215..10d0e19a6d 100644 --- a/charts/descheduler/templates/cronjob.yaml +++ b/charts/descheduler/templates/cronjob.yaml @@ -7,6 +7,9 @@ metadata: spec: schedule: {{ .Values.schedule | quote }} concurrencyPolicy: "Forbid" + {{- if .Values.startingDeadlineSeconds }} + startingDeadlineSeconds: {{ .Values.startingDeadlineSeconds }} + {{- end }} jobTemplate: spec: template: diff --git a/charts/descheduler/values.yaml b/charts/descheduler/values.yaml index a7056b4bd7..bb2c641591 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -20,6 +20,7 @@ nameOverride: "" fullnameOverride: "" schedule: "*/2 * * * *" +#startingDeadlineSeconds: 200 cmdOptions: v: 3