pyth.yaml 877 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: pyth
  6. labels:
  7. app: pyth
  8. spec:
  9. clusterIP: None
  10. selector:
  11. app: pyth
  12. ports:
  13. - port: 4242
  14. name: pyth-accounts
  15. protocol: TCP
  16. ---
  17. apiVersion: apps/v1
  18. kind: StatefulSet
  19. metadata:
  20. name: pyth
  21. spec:
  22. selector:
  23. matchLabels:
  24. app: pyth
  25. serviceName: pyth
  26. template:
  27. metadata:
  28. labels:
  29. app: pyth
  30. spec:
  31. restartPolicy: Always
  32. terminationGracePeriodSeconds: 0
  33. containers:
  34. - name: pyth-publisher
  35. image: pyth
  36. command:
  37. - python3
  38. - /opt/pyth/pyth_publisher.py
  39. readinessProbe:
  40. tcpSocket:
  41. port: 2000
  42. periodSeconds: 1
  43. failureThreshold: 300
  44. ports:
  45. - containerPort: 4242
  46. name: pyth-accounts
  47. protocol: TCP