2022-04-13 01:28:30 -07:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: pyth-price-service
|
|
|
|
labels:
|
|
|
|
app: pyth-price-service
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 8081
|
|
|
|
name: prometheus
|
|
|
|
protocol: TCP
|
|
|
|
- port: 4200
|
|
|
|
name: rest-api
|
|
|
|
protocol: TCP
|
|
|
|
clusterIP: None
|
|
|
|
selector:
|
|
|
|
app: pyth-price-service
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: pyth-price-service
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: pyth-price-service
|
|
|
|
serviceName: pyth-price-service
|
2023-01-24 01:40:24 -08:00
|
|
|
replicas: 1
|
2022-04-13 01:28:30 -07:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: pyth-price-service
|
|
|
|
spec:
|
|
|
|
terminationGracePeriodSeconds: 0
|
|
|
|
containers:
|
|
|
|
- name: pyth-price-service
|
|
|
|
image: pyth-price-service
|
|
|
|
ports:
|
|
|
|
- containerPort: 8081
|
|
|
|
name: prometheus
|
|
|
|
protocol: TCP
|
|
|
|
- containerPort: 4200
|
|
|
|
name: rest-api
|
|
|
|
protocol: TCP
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
2022-11-24 05:14:29 -08:00
|
|
|
path: "/ready"
|
2022-04-13 01:28:30 -07:00
|
|
|
port: 4200
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
periodSeconds: 1
|
|
|
|
failureThreshold: 1
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
2022-11-24 05:14:29 -08:00
|
|
|
path: "/live"
|
2022-04-13 01:28:30 -07:00
|
|
|
port: 4200
|
|
|
|
initialDelaySeconds: 20
|
|
|
|
periodSeconds: 30
|
|
|
|
timeoutSeconds: 30
|
|
|
|
env:
|
|
|
|
- name: SPY_SERVICE_HOST
|
|
|
|
value: spy:7072
|
|
|
|
- name: SPY_SERVICE_FILTERS
|
|
|
|
value: '[{"chain_id":1,"emitter_address":"71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b"}]'
|
|
|
|
- name: REST_PORT
|
2022-11-24 05:14:29 -08:00
|
|
|
value: "4200"
|
2022-04-13 01:28:30 -07:00
|
|
|
- name: PROM_PORT
|
2022-11-24 05:14:29 -08:00
|
|
|
value: "8081"
|
2022-04-13 01:28:30 -07:00
|
|
|
- name: READINESS_SPY_SYNC_TIME_SECONDS
|
2022-11-24 05:14:29 -08:00
|
|
|
value: "5"
|
2022-04-13 01:28:30 -07:00
|
|
|
- name: READINESS_NUM_LOADED_SYMBOLS
|
2022-11-24 05:14:29 -08:00
|
|
|
value: "6"
|
2022-04-13 01:28:30 -07:00
|
|
|
- name: LOG_LEVEL
|
|
|
|
value: debug
|
2023-01-13 07:08:27 -08:00
|
|
|
- name: REMOVE_EXPIRED_VALUES_INTERVAL_SECONDS
|
|
|
|
value: "60"
|
|
|
|
- name: CACHE_TTL_SECONDS
|
|
|
|
value: "300"
|
2023-01-24 01:40:24 -08:00
|
|
|
- name: tests
|
|
|
|
image: pyth-price-service
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- "npm run test && nc -lkp 2358 0.0.0.0"
|
|
|
|
readinessProbe:
|
|
|
|
periodSeconds: 5
|
|
|
|
failureThreshold: 300
|
|
|
|
tcpSocket:
|
|
|
|
port: 2358
|