Skip to content

Commit 6d79cc1

Browse files
authored
Merge pull request #185 from knikolla/invoicing/cronjob
Add cronjob for fetch-daily-billable-usage
2 parents 93c5d2a + 203b0cc commit 6d79cc1

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apiVersion: batch/v1
2+
kind: CronJob
3+
metadata:
4+
name: fetch-daily-billable-usage-cronjob
5+
spec:
6+
schedule: "0 8 * * *"
7+
jobTemplate:
8+
spec:
9+
template:
10+
spec:
11+
containers:
12+
- name: fetch-daily-billable-usage-cronjob
13+
image: ghcr.io/nerc-project/coldfront-nerc:v0.6.1
14+
imagePullPolicy: Always
15+
command: ['coldfront']
16+
args: ['fetch_daily_billable_usage']
17+
env:
18+
- name: DATABASE_HOST
19+
valueFrom:
20+
secretKeyRef:
21+
name: coldfront-postgres-ha-pguser-coldfront-postgres-ha
22+
key: host
23+
- name: DATABASE_PORT
24+
valueFrom:
25+
secretKeyRef:
26+
name: coldfront-postgres-ha-pguser-coldfront-postgres-ha
27+
key: port
28+
- name: DATABASE_NAME
29+
valueFrom:
30+
secretKeyRef:
31+
name: coldfront-postgres-ha-pguser-coldfront-postgres-ha
32+
key: dbname
33+
- name: DATABASE_USER
34+
valueFrom:
35+
secretKeyRef:
36+
name: coldfront-postgres-ha-pguser-coldfront-postgres-ha
37+
key: user
38+
- name: DATABASE_PASSWORD
39+
valueFrom:
40+
secretKeyRef:
41+
name: coldfront-postgres-ha-pguser-coldfront-postgres-ha
42+
key: password
43+
envFrom:
44+
- configMapRef:
45+
name: coldfront-configmap
46+
- secretRef:
47+
name: coldfront-secrets
48+
- secretRef:
49+
name: storage-invoice-s3-secrets
50+
restartPolicy: Never

0 commit comments

Comments
 (0)