-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathimport-organizations-cronjob.yml
More file actions
34 lines (34 loc) · 1.01 KB
/
import-organizations-cronjob.yml
File metadata and controls
34 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: batch/v1
kind: CronJob
metadata:
name: import-organizations
labels:
{{- include "helm.labels" . | nindent 4 }}
spec:
schedule: "15 0 * * *"
startingDeadlineSeconds: 900
concurrencyPolicy: Forbid
failedJobsHistoryLimit: 1
successfulJobsHistoryLimit: 3
jobTemplate:
metadata:
labels:
{{- include "helm.selectorLabels" . | nindent 8 }}
spec:
activeDeadlineSeconds: 1800
template:
spec:
restartPolicy: OnFailure
containers:
- name: import-organizations
image: "{{ .Values.image.repository }}/moocfi-backend:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["sh", "-c", "npm run import-organizations"]
envFrom:
- secretRef:
name: backend-secret
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: new-redis
key: redis-password