-
Notifications
You must be signed in to change notification settings - Fork 10
/
cronjob.yaml
27 lines (27 loc) · 965 Bytes
/
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
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hnhiring-get-data
spec:
schedule: "0,15,30,45 * 1,2 * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
volumes:
- name: google-cloud-key
secret:
secretName: gs-key
containers:
- name: hnhiring-get-data
image: "gcr.io/micahw-com/hnhiring_get_data:45660462da73fdf0c8c30ab070e9b510ebfd19ab"
command: ["/bin/sh"]
args: ["-c", "echo \"[Credentials]\ngs_service_key_file=/var/secrets/google/key.json\" > ~/.boto && RUST_LOG=info /get_data /data && gsutil cp /data/* gs://www.hnhiring.me/data"]
volumeMounts:
- name: google-cloud-key
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
restartPolicy: Never