Skip to content

Commit

Permalink
update cromjob for osmcha
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Apr 2, 2024
1 parent e3fe311 commit 8954b81
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions osm-seed/templates/osmcha-app/cronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,42 @@ spec:
- -c
- |
python manage.py fetchchangesets
envFrom:
- configMapRef:
name: {{ .Release.Name }}-osmcha-common-env
restartPolicy: Never
{{- if .Values.osmchaApi.nodeSelector.enabled }}
nodeSelector:
{{ .Values.osmchaApi.nodeSelector.label_key }} : {{ .Values.osmchaApi.nodeSelector.label_value }}
{{- end }}

---
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ .Release.Name }}-osmcha-process-changesets-cronjob
labels:
app: {{ template "osm-seed.name" . }}
component: osmcha-app-deployment
environment: {{ .Values.environment }}
release: {{ .Release.Name }}
spec:
schedule: "0 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
jobTemplate:
spec:
template:
spec:
containers:
- name: {{ .Release.Name }}-osmcha-process-changesets
image: "{{ .Values.osmchaApi.image.name }}:{{ .Values.osmchaApi.image.tag }}"
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |
python manage.py backfill_changesets $(date -d "yesterday" +%Y-%m-%d) $(date +%Y-%m-%d)
envFrom:
- configMapRef:
Expand Down

0 comments on commit 8954b81

Please sign in to comment.