-
Notifications
You must be signed in to change notification settings - Fork 0
/
02_ingestion-job.yaml
71 lines (71 loc) · 1.96 KB
/
02_ingestion-job.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
62
63
64
65
66
67
68
69
70
71
apiVersion: v1
kind: ConfigMap
metadata:
name: glvd-ingestion
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-ingestion
data:
databaseName: glvd
databaseHost: glvd-database-0.glvd-database
databasePort: "5432"
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: glvd-ingestion
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-ingestion
spec:
schedule: "30 8 * * 1-5"
timeZone: "Europe/Berlin"
jobTemplate:
metadata:
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-ingestion
spec:
template:
spec:
restartPolicy: Never
containers:
- name: data-ingestion
image: ghcr.io/gardenlinux/glvd-data-ingestion:latest
# resources:
# requests:
# cpu: "1"
# memory: "2Gi"
# limits:
# cpu: "2"
# memory: "4Gi"
command:
- /bin/bash
- -c
- sleep 5 && echo start && /usr/local/src/ingest-postgres.sh
env:
- name: PGDATABASE
valueFrom:
configMapKeyRef:
name: glvd-ingestion
key: databaseName
- name: PGUSER
valueFrom:
secretKeyRef:
name: postgres-credentials
key: username
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials
key: password
- name: PGHOST
valueFrom:
configMapKeyRef:
name: glvd-ingestion
key: databaseHost
- name: PGPORT
valueFrom:
configMapKeyRef:
name: glvd-ingestion
key: databasePort