-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcronjob.yaml
61 lines (61 loc) · 1.85 KB
/
cronjob.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: batch/v1
kind: CronJob
metadata:
name: cybersource
spec:
schedule: "30 16 3 * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
imagePullSecrets:
- name: ghcr
containers:
- image: ghcr.io/sul-dlss/cybersource-rest-ruby:main
name: cybersource
envFrom:
- secretRef:
name: db-connect-modules
imagePullPolicy: Always
command: [ "/bin/bash", "-c", "--" ]
args: [ "cd /etc/mail && make && service sendmail restart; cd /home/cybersource && rake report_and_mail >> files/reports.log 2>&1;" ]
env:
- name: EMAIL_REPORT_TO
valueFrom:
secretKeyRef:
name: cybersource
key: EMAIL_REPORT_TO
- name: MERCHANT_KEY_ID
valueFrom:
secretKeyRef:
name: cybersource
key: MERCHANT_KEY_ID
- name: MERCHANT_SECRET_KEY
valueFrom:
secretKeyRef:
name: cybersource
key: MERCHANT_SECRET_KEY
volumeMounts:
- mountPath: home/files
name: cybersource-files
- mountPath: /etc/mail/sendmail.mc
name: sendmail
subPath: sendmail.mc
resources:
limits:
cpu: 128m
memory: 512Mi
requests:
cpu: 50m
memory: 400Mi
restartPolicy: Never
volumes:
- name: cybersource-files
persistentVolumeClaim:
claimName: cybersource-files
- name: sendmail
secret:
secretName: sendmail