Skip to content

Commit

Permalink
update cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-mher committed May 30, 2023
1 parent ef8fb95 commit 254b639
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: backend
description: Helm chart scaffolding for Backend applications.
type: application
version: 3.6.0
version: 3.6.1
appVersion: 1.3.0
7 changes: 6 additions & 1 deletion charts/backend/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.cronjob.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
Expand Down Expand Up @@ -48,7 +49,10 @@ spec:
name: {{ $v.name }}
{{- end }}
{{- end }}

{{- with .Values.cronjob.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: "{{ include "laravel.fullname" . }}"
image: "{{ .Values.cronjob.image.repository }}:{{ .Values.cronjob.image.tag }}"
Expand Down Expand Up @@ -94,3 +98,4 @@ spec:
name: {{ $v.name }}
{{- end }}
{{- end }}
{{- end }}
7 changes: 4 additions & 3 deletions charts/backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,13 @@ externalsecrets:
- DB_USERNAME

cronjob:
schedule: "*/1 * * * *"
enabled: false
schedule: "* * * * *"
concurrencyPolicy: "Forbid"
restartPolicy: "Never"
failedJobsHistoryLimit: 1
failedJobsHistoryLimit: 10
successfulJobsHistoryLimit: 1

nodeSelector: {}
image:
repository: "busybox"
tag: "latest"
Expand Down

0 comments on commit 254b639

Please sign in to comment.