Skip to content

Commit

Permalink
feat(cluster-manager): configurable cronjob parameters (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 authored Jan 23, 2025
1 parent cead9b5 commit ef21e04
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
category: DeveloperTools
apiVersion: v2
name: cluster-manager
version: 0.18.2
version: 0.19.0
appVersion: 1.7.10
description: Helm chart to deploy cluster-manager
icon: https://avatars.githubusercontent.com/u/9391624?s=200&v=4
Expand Down
34 changes: 28 additions & 6 deletions charts/cluster-manager/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,36 @@ metadata:
app.kubernetes.io/component: cluster-manager
{{- include "cluster-manager.labels" $ | nindent 4 }}
spec:
schedule: {{ hasKey $commandDict "schedule" | ternary $commandDict.schedule $.Values.schedule | quote }}
startingDeadlineSeconds: 600
concurrencyPolicy: "Forbid"
failedJobsHistoryLimit: 1
successfulJobsHistoryLimit: 1
schedule: {{ hasKey $commandDict "schedule" | ternary $commandDict.schedule $.Values.cronJob.schedule | quote }}
{{- with $.Values.cronJob.timeZone }}
timeZone: {{ . }}
{{- end }}
{{- with $.Values.cronJob.startingDeadlineSeconds }}
startingDeadlineSeconds: {{ . }}
{{- end }}
{{- with $.Values.cronJob.concurrencyPolicy }}
concurrencyPolicy: {{ . }}
{{- end }}
{{- with $.Values.cronJob.suspend }}
suspend: {{ . }}
{{- end }}
{{- with $.Values.cronJob.successfulJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ . }}
{{- end }}
{{- with $.Values.cronJob.failedJobsHistoryLimit }}
failedJobsHistoryLimit: {{ . }}
{{- end }}
jobTemplate:
spec:
backoffLimit: 0
{{- with $.Values.cronJob.backoffLimit }}
backoffLimit: {{ . }}
{{- end }}
{{- with $.Values.cronJob.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ . }}
{{- end }}
{{- with $.Values.cronJob.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ . }}
{{- end }}
template:
metadata:
labels:
Expand Down
13 changes: 11 additions & 2 deletions charts/cluster-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ imagePullSecrets: []

priorityClassName: ""

schedule: "0 10 * * *"

rootCommand: "cluster-manager"

cronJob:
schedule: "0 10 * * *"
timeZone: ""
startingDeadlineSeconds: 600
concurrencyPolicy: Forbid
suspend: ""
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
backoffLimit: "0"
ttlSecondsAfterFinished: ""

cronJobs: {}
# GCInvalidPods:
# command:
Expand Down

0 comments on commit ef21e04

Please sign in to comment.