diff --git a/charts/renovate/README.md b/charts/renovate/README.md index 5240fb1ed..6e6b571c5 100644 --- a/charts/renovate/README.md +++ b/charts/renovate/README.md @@ -43,6 +43,8 @@ The following table lists the configurable parameters of the chart and the defau | apiVersionOverrides.cronjob | string | `""` | String to override apiVersion of cronjob rendered by this helm chart | | cronjob.activeDeadlineSeconds | string | `""` | Deadline for the job to finish | | cronjob.annotations | object | `{}` | Annotations to set on the cronjob | +| cronjob.argsOverride | list | `[]` | Custom arguments to run in the container | +| cronjob.commandOverride | list | `[]` | Custom command to run in the container | | cronjob.completionMode | string | `""` | "Where the jobs should be NonIndexed or Indexed" | | cronjob.completions | string | `""` | "Number of successful completions is reached to mark the job as complete" | | cronjob.concurrencyPolicy | string | `""` | "Allow" to allow concurrent runs, "Forbid" to skip new runs if a previous run is still running or "Replace" to replace the previous run | diff --git a/charts/renovate/templates/cronjob.yaml b/charts/renovate/templates/cronjob.yaml index a0f6634e4..7ea95a10c 100644 --- a/charts/renovate/templates/cronjob.yaml +++ b/charts/renovate/templates/cronjob.yaml @@ -88,7 +88,16 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if or .Values.cronjob.preCommand .Values.cronjob.postCommand}} + {{- if or .Values.cronjob.commandOverride .Values.cronjob.argsOverride }} + {{- if .Values.cronjob.commandOverride }} + command: + {{- toYaml .Values.cronjob.commandOverride | nindent 16 }} + {{- end }} + {{- if .Values.cronjob.argsOverride }} + args: + {{- toYaml .Values.cronjob.argsOverride | nindent 16 }} + {{- end }} + {{- else if or .Values.cronjob.preCommand .Values.cronjob.postCommand }} command: ["/bin/bash", "-c"] args: - | diff --git a/charts/renovate/values.yaml b/charts/renovate/values.yaml index 1a000275a..7fd0749cd 100644 --- a/charts/renovate/values.yaml +++ b/charts/renovate/values.yaml @@ -45,6 +45,10 @@ cronjob: # image: INIT_CONTAINER_IMAGE # -- Number of pods to run in parallel parallelism: '' + # -- Custom command to run in the container + commandOverride: [] + # -- Custom arguments to run in the container + argsOverride: [] # -- Prepend shell commands before renovate runs preCommand: '' # preCommand: |