bigtable.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. labels:
  5. app: bigtable-emulator
  6. name: bigtable-emulator
  7. spec:
  8. ports:
  9. - name: clients
  10. port: 8086
  11. targetPort: clients
  12. protocol: TCP
  13. selector:
  14. app: bigtable-emulator
  15. ---
  16. apiVersion: apps/v1
  17. kind: StatefulSet
  18. metadata:
  19. labels:
  20. app: bigtable-emulator
  21. name: bigtable-emulator
  22. spec:
  23. serviceName: bigtable-emulator
  24. replicas: 1
  25. selector:
  26. matchLabels:
  27. app: bigtable-emulator
  28. template:
  29. metadata:
  30. labels:
  31. app: bigtable-emulator
  32. spec:
  33. containers:
  34. - name: bigtable-emulator
  35. image: google/cloud-sdk:353.0.0-alpine@sha256:594278737ce111f7922afa8722b4b526c19938e74b9ab931d23c4d2755802d3a
  36. env:
  37. - name: BIGTABLE_EMULATOR_HOST
  38. value: localhost:8086
  39. command:
  40. - /bin/sh
  41. - -c
  42. - |
  43. echo project = local-dev > ~/.cbtrc
  44. echo instance = wormhole >> ~/.cbtrc
  45. gcloud --quiet components install beta cbt bigtable
  46. gcloud --quiet beta emulators bigtable start --host-port=0.0.0.0:8086 &
  47. sleep 3
  48. cbt createtable v2Events "families=MessagePublication,QuorumState,TokenTransferPayload,AssetMetaPayload,NFTTransferPayload,TokenTransferDetails,ChainDetails"
  49. nc -lkp 2000 0.0.0.0
  50. readinessProbe:
  51. periodSeconds: 2
  52. failureThreshold: 300
  53. tcpSocket:
  54. port: 2000
  55. ports:
  56. - containerPort: 8086
  57. name: clients
  58. protocol: TCP
  59. ---
  60. apiVersion: v1
  61. kind: Service
  62. metadata:
  63. labels:
  64. app: pubsub-emulator
  65. name: pubsub-emulator
  66. spec:
  67. ports:
  68. - name: listeners
  69. port: 8085
  70. targetPort: listeners
  71. protocol: TCP
  72. selector:
  73. app: pubsub-emulator
  74. ---
  75. apiVersion: apps/v1
  76. kind: StatefulSet
  77. metadata:
  78. labels:
  79. app: pubsub-emulator
  80. name: pubsub-emulator
  81. spec:
  82. serviceName: pubsub-emulator
  83. replicas: 1
  84. selector:
  85. matchLabels:
  86. app: pubsub-emulator
  87. template:
  88. metadata:
  89. labels:
  90. app: pubsub-emulator
  91. spec:
  92. containers:
  93. - name: pubsub-emulator
  94. image: gcr.io/google.com/cloudsdktool/cloud-sdk@sha256:d7748afac2e3dc3768bfd0db16d26a7c538821146e433874acff0eb1cfd853ba
  95. env:
  96. - name: PUBSUB_EMULATOR_HOST
  97. value: localhost:8085
  98. - name: PUBSUB_PROJECT_ID
  99. value: local-dev
  100. command:
  101. - /bin/sh
  102. - -c
  103. - |
  104. gcloud --quiet components install beta pubsub-emulator
  105. gcloud --quiet beta emulators pubsub start --host-port=0.0.0.0:8085
  106. readinessProbe:
  107. periodSeconds: 2
  108. failureThreshold: 300
  109. tcpSocket:
  110. port: 8085
  111. ports:
  112. - containerPort: 8085
  113. name: listeners
  114. protocol: TCP
  115. ---
  116. apiVersion: v1
  117. kind: Service
  118. metadata:
  119. labels:
  120. app: bigtable-functions
  121. name: bigtable-functions
  122. spec:
  123. ports:
  124. - name: functions
  125. port: 8090
  126. targetPort: functions
  127. protocol: TCP
  128. selector:
  129. app: bigtable-functions
  130. ---
  131. apiVersion: apps/v1
  132. kind: StatefulSet
  133. metadata:
  134. labels:
  135. app: cloud-functions
  136. name: cloud-functions
  137. spec:
  138. serviceName: cloud-functions
  139. replicas: 1
  140. selector:
  141. matchLabels:
  142. app: cloud-functions
  143. template:
  144. metadata:
  145. labels:
  146. app: cloud-functions
  147. spec:
  148. containers:
  149. - name: cloud-functions
  150. image: cloud-functions
  151. env:
  152. - name: BIGTABLE_EMULATOR_HOST
  153. value: bigtable-emulator:8086
  154. - name: PUBSUB_EMULATOR_HOST
  155. value: pubsub-emulator:8085
  156. - name: GCP_PROJECT
  157. value: local-dev
  158. - name: BIGTABLE_INSTANCE
  159. value: wormhole
  160. - name: PUBSUB_NEW_VAA_TOPIC
  161. value: new-vaa-devnet
  162. - name: PUBSUB_NEW_VAA_SUBSCRIPTION
  163. value: extract-payload-devnet
  164. - name: PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC
  165. value: create-token-transfer-details-devnet
  166. - name: PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION
  167. value: calculate-transfer-data-devnet
  168. ports:
  169. - containerPort: 8080
  170. name: functions
  171. protocol: TCP
  172. readinessProbe:
  173. httpGet:
  174. port: 8080
  175. path: /readyz