wormchain.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # Service for pods in the StatefulSet, for RPC clients.
  2. # these ports are exposed to the host OS via Tiltfile config.
  3. apiVersion: v1
  4. kind: Service
  5. metadata:
  6. labels:
  7. app: wormchain
  8. name: wormchain
  9. spec:
  10. ports:
  11. - name: rpc
  12. port: 26657
  13. protocol: TCP
  14. - name: p2p
  15. port: 26656
  16. protocol: TCP
  17. - name: rest
  18. port: 1317
  19. protocol: TCP
  20. - name: cosmos-rpc
  21. port: 9090
  22. protocol: TCP
  23. selector:
  24. app: wormchain
  25. ---
  26. # Service for an individual pod, so other pods can resolve it by name for p2p.
  27. apiVersion: v1
  28. kind: Service
  29. metadata:
  30. labels:
  31. app: wormchain
  32. name: wormchain-0
  33. spec:
  34. ports:
  35. - name: rpc
  36. port: 26657
  37. protocol: TCP
  38. - name: p2p
  39. port: 26656
  40. protocol: TCP
  41. - name: rest
  42. port: 1317
  43. protocol: TCP
  44. - name: cosmos-rpc
  45. port: 9090
  46. protocol: TCP
  47. selector:
  48. statefulset.kubernetes.io/pod-name: wormchain-0
  49. ---
  50. apiVersion: apps/v1
  51. kind: StatefulSet
  52. metadata:
  53. labels:
  54. app: wormchain
  55. name: wormchain
  56. spec:
  57. selector:
  58. matchLabels:
  59. app: wormchain
  60. serviceName: wormchain
  61. replicas: 1
  62. updateStrategy:
  63. type: RollingUpdate
  64. template:
  65. metadata:
  66. labels:
  67. app: wormchain
  68. spec:
  69. containers:
  70. - name: wormchaind
  71. image: wormchaind-image
  72. command:
  73. - /bin/bash
  74. - -c
  75. - "/app/devnet/create-config.sh; /app/build/wormchaind start"
  76. ports:
  77. - containerPort: 26657
  78. name: tendermint
  79. protocol: TCP
  80. - containerPort: 26656
  81. name: p2p
  82. protocol: TCP
  83. - containerPort: 1317
  84. name: rest
  85. protocol: TCP
  86. - containerPort: 9090
  87. name: cosmos-rpc
  88. protocol: TCP
  89. readinessProbe:
  90. httpGet:
  91. port: 26657
  92. path: /
  93. periodSeconds: 5
  94. restartPolicy: Always
  95. ---
  96. apiVersion: apps/v1
  97. kind: StatefulSet
  98. metadata:
  99. labels:
  100. app: wormchain-deploy
  101. name: wormchain-deploy
  102. spec:
  103. selector:
  104. matchLabels:
  105. app: wormchain-deploy
  106. replicas: 1
  107. updateStrategy:
  108. type: RollingUpdate
  109. template:
  110. metadata:
  111. labels:
  112. app: wormchain-deploy
  113. spec:
  114. containers:
  115. - name: wormchain-deploy
  116. image: wormchain-deploy
  117. command:
  118. - /bin/sh
  119. - -c
  120. - "npm run deploy-wormchain --prefix=/app/tools && touch /app/tools/success && sleep infinity"
  121. readinessProbe:
  122. exec:
  123. command:
  124. - test
  125. - -e
  126. - "/app/tools/success"
  127. initialDelaySeconds: 5
  128. periodSeconds: 5
  129. restartPolicy: Always