pyth-price-service.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: pyth-price-service
  6. labels:
  7. app: pyth-price-service
  8. spec:
  9. ports:
  10. - port: 8081
  11. name: prometheus
  12. protocol: TCP
  13. - port: 4200
  14. name: rest-api
  15. protocol: TCP
  16. clusterIP: None
  17. selector:
  18. app: pyth-price-service
  19. ---
  20. apiVersion: apps/v1
  21. kind: Deployment
  22. metadata:
  23. name: pyth-price-service
  24. spec:
  25. selector:
  26. matchLabels:
  27. app: pyth-price-service
  28. serviceName: pyth-price-service
  29. replicas: 2
  30. template:
  31. metadata:
  32. labels:
  33. app: pyth-price-service
  34. spec:
  35. terminationGracePeriodSeconds: 0
  36. containers:
  37. - name: pyth-price-service
  38. image: pyth-price-service
  39. ports:
  40. - containerPort: 8081
  41. name: prometheus
  42. protocol: TCP
  43. - containerPort: 4200
  44. name: rest-api
  45. protocol: TCP
  46. readinessProbe:
  47. httpGet:
  48. path: '/ready'
  49. port: 4200
  50. initialDelaySeconds: 10
  51. periodSeconds: 1
  52. failureThreshold: 1
  53. livenessProbe:
  54. httpGet:
  55. path: '/live'
  56. port: 4200
  57. initialDelaySeconds: 20
  58. periodSeconds: 30
  59. timeoutSeconds: 30
  60. resources:
  61. limits:
  62. memory: "128Mi"
  63. cpu: "500m"
  64. env:
  65. - name: SPY_SERVICE_HOST
  66. value: spy:7072
  67. - name: SPY_SERVICE_FILTERS
  68. value: '[{"chain_id":1,"emitter_address":"71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b"}]'
  69. - name: REST_PORT
  70. value: '4200'
  71. - name: PROM_PORT
  72. value: '8081'
  73. - name: READINESS_SPY_SYNC_TIME_SECONDS
  74. value: '5'
  75. - name: READINESS_NUM_LOADED_SYMBOLS
  76. value: '6'
  77. - name: LOG_LEVEL
  78. value: debug