-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdeployment.yml
48 lines (48 loc) · 1.31 KB
/
deployment.yml
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
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: crawler-news
namespace: crawler
spec:
schedule: "*/30 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- args:
- python3
- run.py
env:
- name: PGSQL_DATABASE
value: scrape_book
- name: PGSQL_HOST
valueFrom:
secretKeyRef:
name: pgsql
key: host
- name: PGSQL_PASSWORD
valueFrom:
secretKeyRef:
name: pgsql
key: password
- name: PGSQL_PORT
valueFrom:
secretKeyRef:
name: pgsql
key: port
- name: PGSQL_USER
valueFrom:
secretKeyRef:
name: pgsql
key: user
image: germey/crawler-news
name: crawler-news
resources:
limits:
memory: "200Mi"
cpu: "150m"
requests:
memory: "200Mi"
cpu: "150m"
restartPolicy: OnFailure