-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdeployment-single.yml
52 lines (52 loc) · 1.55 KB
/
deployment-single.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
49
50
51
52
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: crawler-weibo-single
namespace: crawler
spec:
schedule: "*/20 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- args:
- scrapy
- crawl
- single
env:
- name: WEIBO_WEIBO_ID
value: '4467107636950632'
- name: WEIBO_COOKIES
valueFrom:
secretKeyRef:
name: weibo
key: cookies
- name: ELASTICSEARCH_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: elasticsearch
key: connection_string
- name: REDIS_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: redis
key: connection_string
- name: PROXYPOOL_URL
valueFrom:
secretKeyRef:
name: adslproxy
key: universal
- name: PROXYPOOL_ENABLED
value: 'true'
image: germey/crawler-weibo-single
name: crawler-weibo-single
imagePullPolicy: Always
resources:
limits:
memory: "200Mi"
cpu: "150m"
requests:
memory: "200Mi"
cpu: "150m"
restartPolicy: OnFailure