-
Notifications
You must be signed in to change notification settings - Fork 251
/
pull_intraday_per_minute.yml
147 lines (147 loc) · 4.33 KB
/
pull_intraday_per_minute.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
apiVersion: batch/v1
kind: Job
metadata:
name: ae-dataset-intraday
annotations:
description: The Stock Analysis Dataset Collector for fetching from IEX Cloud and Tradier datasets every minute
runtime: python3
labels:
sa: engine
purpose: collect-intraday
layer: backend
messaging: redis
cache: redis
pubsub: publisher
spec:
template:
metadata:
labels:
app: ae-dataset-intraday
backend: enabled
purpose: stock-analysis
layer: backend
messaging: redis
cache: redis
pubsub: publisher
spec:
hostname: ae-dataset-intraday
restartPolicy: Never
# imagePullSecrets:
# - name: ae.docker.creds
containers:
- image: jayjohnson/stock-analysis-engine:latest
imagePullPolicy: Always
name: ae-dataset-intraday
resources: {}
command: [
"/bin/bash",
"-c",
"cd /opt/sa/ && . /opt/venv/bin/activate && /opt/sa/tools/start-dataset-collection.sh"
]
env:
- name: DATASET_SOURCES
value: intraday
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: api.db
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: api.db
key: password
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: api.db
key: dbname
- name: S3_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ae.k8.minio.s3
key: aws_access_key_id
- name: S3_SECRET_KEY
valueFrom:
secretKeyRef:
name: ae.k8.minio.s3
key: aws_secret_access_key
- name: S3_ADDRESS
value: minio-service:9000
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: ae.k8.minio.s3
key: aws_access_key_id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ae.k8.minio.s3
key: aws_secret_access_key
- name: S3_REGION_NAME
value: us-east-1
- name: WORKER_BROKER_URL
value: redis://redis-master:6379/13
- name: WORKER_BACKEND_URL
value: redis://redis-master:6379/14
- name: REDIS_ADDRESS
value: redis-master:6379
- name: REDIS_DB
value: "0"
# Stock Analysis - Dataset Collector Envs:
- name: S3_BUCKET
value: pricing
- name: DAILY_S3_BUCKET_NAME
value: daily
- name: MINUTE_S3_BUCKET_NAME
value: minute
- name: TICK_S3_BUCKET_NAME
value: tick
- name: STATS_S3_BUCKET_NAME
value: stats
- name: PEERS_S3_BUCKET_NAME
value: peers
- name: NEWS_S3_BUCKET_NAME
value: news
- name: FINANCIALS_S3_BUCKET_NAME
value: financials
- name: EARNINGS_S3_BUCKET_NAME
value: earnings
- name: DIVIDENDS_S3_BUCKET_NAME
value: dividends
- name: COMPANY_S3_BUCKET_NAME
value: company
- name: PREPARE_S3_BUCKET_NAME
value: prepared
- name: ANALYZE_S3_BUCKET_NAME
value: analyzed
- name: TICKER
value: SPY
# Pull your own tickers here:
- name: DEFAULT_TICKERS
value: SPY,AMZN,TSLA
# set to your Slack webhook url:
- name: SLACK_WEBHOOK
valueFrom:
secretKeyRef:
name: ae.k8.slack
key: webhook
# set to your Slack OAuth Access Token or Bot User OAuth Access Token
- name: SLACK_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: ae.k8.slack
key: access_token
# set comma separated Slack channels (without '#') to publish plots to
- name: SLACK_PUBLISH_PLOT_CHANNELS
valueFrom:
secretKeyRef:
name: ae.k8.slack
key: channels
# set to "1" to enable publishing to slack when
# each ticker's job completes
- name: DATASET_COLLECTION_SLACK_ALERTS
value: "0"
# set to "1" to publish Celery task failures to Slack
- name: PROD_SLACK_ALERTS
value: "0"