@vaharoni/devops 1.2.13 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/dist/chunk-N7EX3HJH.js +139 -0
  2. package/dist/chunk-RZ46YYZZ.js +420 -0
  3. package/dist/chunk-WKP7EQNU.js +421 -0
  4. package/dist/devops.d.ts +0 -2
  5. package/dist/devops.js +3235 -91
  6. package/dist/index.d.ts +972 -4
  7. package/dist/index.js +67 -3
  8. package/dist/plugins.d.ts +95 -4
  9. package/dist/plugins.js +20 -6
  10. package/dist/src/target-templates/README.md +1 -0
  11. package/dist/src/target-templates/cluster-resource-options/README.md +2 -0
  12. package/dist/src/target-templates/cluster-resource-options/dns-test/dns-test.yaml +60 -0
  13. package/dist/src/target-templates/cluster-resource-options/milvus/production/milvus-values.yaml +2 -0
  14. package/dist/src/target-templates/cluster-resource-options/milvus/staging/milvus-values.yaml +2 -0
  15. package/dist/src/target-templates/cluster-resource-options/monitoring-ingress/monitoring-ingress.yaml +62 -0
  16. package/dist/src/target-templates/cluster-resource-options/postgres/daily-operator-restart.yaml +54 -0
  17. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/PodDisruptionBudget.yaml +27 -0
  18. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/SGCluster.yaml +47 -0
  19. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/StackGres-alerts.yaml +191 -0
  20. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/06-SGDistributedLogs.yaml +11 -0
  21. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/07-SGObjectStorage.yaml +18 -0
  22. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/08-SGScript.yaml +12 -0
  23. package/dist/src/target-templates/cluster-resource-options/postgres/stackgres-ui-ingress.yaml +35 -0
  24. package/dist/src/target-templates/cluster-resource-options/postgres/staging/cluster/SGCluster.yaml +42 -0
  25. package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/07-SGObjectStorage.yaml +18 -0
  26. package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/08-SGScript.yaml +12 -0
  27. package/dist/src/target-templates/cluster-resource-options/prefect/production/prefect-values.yaml +14 -0
  28. package/dist/src/target-templates/cluster-resource-options/prefect/staging/prefect-values.yaml +14 -0
  29. package/dist/src/target-templates/cluster-resource-options/redis/production/redis-values.yaml +20 -0
  30. package/dist/src/target-templates/cluster-resource-options/redis/staging/redis-values.yaml +8 -0
  31. package/dist/src/target-templates/infra-variants/README.md +2 -0
  32. package/dist/src/target-templates/infra-variants/digitalocean/.devops/config/constants.yaml +18 -0
  33. package/dist/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml +91 -0
  34. package/dist/src/target-templates/infra-variants/gcloud/.devops/config/constants.yaml +15 -0
  35. package/dist/src/target-templates/infra-variants/gcloud/.devops/manifests/ingress.yaml.hb +22 -0
  36. package/dist/src/target-templates/infra-variants/gcloud/.github/workflows/k8s-build.yaml +95 -0
  37. package/dist/src/target-templates/infra-variants/hetzner/.devops/config/constants.yaml +18 -0
  38. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/harbor-values.yaml +30 -0
  39. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/hcloud-config.yaml +134 -0
  40. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/cert-manager.yaml +25 -0
  41. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-cert.yaml +13 -0
  42. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-values.yaml +76 -0
  43. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/hcloud-config.yaml +113 -0
  44. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-annotations.yaml +49 -0
  45. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-configmap.yaml +8 -0
  46. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/retain-storage-class.yaml +8 -0
  47. package/dist/src/target-templates/infra-variants/hetzner/.github/workflows/k8s-build.yaml +93 -0
  48. package/dist/src/target-templates/lang-variants-common/README.md +4 -0
  49. package/dist/src/target-templates/lang-variants-common/python/.cursor/rules/monorepo-python.mdc +56 -0
  50. package/dist/src/target-templates/lang-variants-common/python/.devops/config/images.yaml +89 -0
  51. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-exec.sh +8 -0
  52. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-run.sh +8 -0
  53. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services.Dockerfile +29 -0
  54. package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/_index.yaml +21 -0
  55. package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/prefect.yaml.hb +63 -0
  56. package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/pyproject.toml +14 -0
  57. package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/src/example_data_pipeline/main.py +38 -0
  58. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/pyproject.toml +20 -0
  59. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/__init__.py +0 -0
  60. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/main.py +13 -0
  61. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/scripts.py +17 -0
  62. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/tests/__init__.py +0 -0
  63. package/dist/src/target-templates/lang-variants-common/python/devopspy +3 -0
  64. package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/pyproject.toml +11 -0
  65. package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/src/example_python_lib/__init__.py +2 -0
  66. package/dist/src/target-templates/lang-variants-common/python/pyproject.toml +16 -0
  67. package/dist/src/target-templates/lang-variants-common/typescript/.cursor/rules/monorepo-typescript.mdc +51 -0
  68. package/dist/src/target-templates/lang-variants-common/typescript/.devops/config/images.yaml +69 -0
  69. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/cloudrun.Dockerfile +31 -0
  70. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/common/docker-common.sh +23 -0
  71. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-exec.sh +8 -0
  72. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-run.sh +8 -0
  73. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services.Dockerfile +31 -0
  74. package/dist/src/target-templates/lang-variants-common/typescript/.devops/env.example.yaml +23 -0
  75. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/_index.yaml +19 -0
  76. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/cron-jobs.yaml.hb +56 -0
  77. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/db-migrate-job.yaml.hb +43 -0
  78. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-debug.yaml.hb +42 -0
  79. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-process.yaml.hb +48 -0
  80. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-web.yaml.hb +54 -0
  81. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/ingress.yaml.hb +21 -0
  82. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/service.yaml.hb +15 -0
  83. package/dist/src/target-templates/lang-variants-common/typescript/.envrc +5 -0
  84. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/build-image@v1/action.yaml +81 -0
  85. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-digital-ocean@v1/action.yaml +29 -0
  86. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-gke@v1/action.yaml +43 -0
  87. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-hetzner@v1/action.yaml +31 -0
  88. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/db-migrate@v1/action.yaml +23 -0
  89. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-cloudrun@v1/action.yaml +71 -0
  90. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-k8s@v1/action.yaml +37 -0
  91. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/setup-prereq@v1/action.yaml +24 -0
  92. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/index.ts +30 -0
  93. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/package.json +26 -0
  94. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/tsconfig.json +3 -0
  95. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/README.md +68 -0
  96. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/index.ts +1 -0
  97. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/package.json +30 -0
  98. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/tsconfig.json +3 -0
  99. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.development +1 -0
  100. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.global +4 -0
  101. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.test +1 -0
  102. package/dist/src/target-templates/lang-variants-common/typescript/devops +3 -0
  103. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/index.ts +3 -0
  104. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/package.json +12 -0
  105. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/tsconfig.json +3 -0
  106. package/dist/src/target-templates/lang-variants-common/typescript/tmp/.gitkeep +0 -0
  107. package/dist/src/target-templates/lang-variants-common/typescript/tsconfig.json +27 -0
  108. package/dist/src/target-templates/lang-variants-prisma/README.md +3 -0
  109. package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/prisma-python.mdc +55 -0
  110. package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/testing-python.mdc +89 -0
  111. package/dist/src/target-templates/lang-variants-prisma/python/db/db/__init__.py +0 -0
  112. package/dist/src/target-templates/lang-variants-prisma/python/db/db/db_client_test.py +46 -0
  113. package/dist/src/target-templates/lang-variants-prisma/python/db/pyproject.toml +14 -0
  114. package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/prisma-typescript.mdc +54 -0
  115. package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/testing-typescript.mdc +103 -0
  116. package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client-test.ts +142 -0
  117. package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client.ts +19 -0
  118. package/dist/src/target-templates/lang-variants-prisma/typescript/db/env.yaml +4 -0
  119. package/dist/src/target-templates/lang-variants-prisma/typescript/db/package.json +17 -0
  120. package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma/schema.prisma +24 -0
  121. package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma-setup-vitest.ts +27 -0
  122. package/dist/src/target-templates/lang-variants-prisma/typescript/db/tsconfig.json +3 -0
  123. package/dist/src/target-templates/lang-variants-prisma/typescript/dml/package.json +7 -0
  124. package/dist/src/target-templates/lang-variants-prisma/typescript/dml/tsconfig.json +3 -0
  125. package/package.json +3 -2
  126. package/src/cli/core/exec.ts +2 -4
  127. package/src/cli/core/run.ts +2 -4
  128. package/src/cli/extensions/prisma.ts +2 -4
  129. package/src/libs/init-generator.ts +2 -4
  130. package/src/pkg-root.ts +14 -0
  131. package/src/plugins.ts +2 -4
  132. package/dist/app-support/crypto/aes.d.ts +0 -15
  133. package/dist/app-support/crypto/aes.d.ts.map +0 -1
  134. package/dist/app-support/crypto/aes.js +0 -56
  135. package/dist/app-support/crypto/aes.spec.d.ts +0 -2
  136. package/dist/app-support/crypto/aes.spec.d.ts.map +0 -1
  137. package/dist/app-support/crypto/aes.spec.js +0 -58
  138. package/dist/app-support/crypto/index.d.ts +0 -16
  139. package/dist/app-support/crypto/index.d.ts.map +0 -1
  140. package/dist/app-support/crypto/index.js +0 -31
  141. package/dist/app-support/crypto/internal-token.d.ts +0 -20
  142. package/dist/app-support/crypto/internal-token.d.ts.map +0 -1
  143. package/dist/app-support/crypto/internal-token.js +0 -42
  144. package/dist/app-support/crypto/internal-token.spec.d.ts +0 -2
  145. package/dist/app-support/crypto/internal-token.spec.d.ts.map +0 -1
  146. package/dist/app-support/crypto/internal-token.spec.js +0 -45
  147. package/dist/app-support/crypto/secret.d.ts +0 -3
  148. package/dist/app-support/crypto/secret.d.ts.map +0 -1
  149. package/dist/app-support/crypto/secret.js +0 -12
  150. package/dist/app-support/crypto/secret.spec.d.ts +0 -2
  151. package/dist/app-support/crypto/secret.spec.d.ts.map +0 -1
  152. package/dist/app-support/crypto/secret.spec.js +0 -15
  153. package/dist/app-support/discovery/dev-discovery-loader.d.ts +0 -2
  154. package/dist/app-support/discovery/dev-discovery-loader.d.ts.map +0 -1
  155. package/dist/app-support/discovery/dev-discovery-loader.js +0 -30
  156. package/dist/app-support/discovery/service-endpoint.d.ts +0 -2
  157. package/dist/app-support/discovery/service-endpoint.d.ts.map +0 -1
  158. package/dist/app-support/discovery/service-endpoint.js +0 -10
  159. package/dist/cli/common.d.ts +0 -89
  160. package/dist/cli/common.d.ts.map +0 -1
  161. package/dist/cli/common.js +0 -246
  162. package/dist/cli/common.spec.d.ts +0 -2
  163. package/dist/cli/common.spec.d.ts.map +0 -1
  164. package/dist/cli/common.spec.js +0 -64
  165. package/dist/cli/core/affected.d.ts +0 -9
  166. package/dist/cli/core/affected.d.ts.map +0 -1
  167. package/dist/cli/core/affected.js +0 -101
  168. package/dist/cli/core/cloudrun.d.ts +0 -9
  169. package/dist/cli/core/cloudrun.d.ts.map +0 -1
  170. package/dist/cli/core/cloudrun.js +0 -119
  171. package/dist/cli/core/console.d.ts +0 -10
  172. package/dist/cli/core/console.d.ts.map +0 -1
  173. package/dist/cli/core/console.js +0 -50
  174. package/dist/cli/core/constant.d.ts +0 -9
  175. package/dist/cli/core/constant.d.ts.map +0 -1
  176. package/dist/cli/core/constant.js +0 -20
  177. package/dist/cli/core/env.d.ts +0 -9
  178. package/dist/cli/core/env.d.ts.map +0 -1
  179. package/dist/cli/core/env.js +0 -65
  180. package/dist/cli/core/exec.d.ts +0 -9
  181. package/dist/cli/core/exec.d.ts.map +0 -1
  182. package/dist/cli/core/exec.js +0 -48
  183. package/dist/cli/core/image.d.ts +0 -9
  184. package/dist/cli/core/image.d.ts.map +0 -1
  185. package/dist/cli/core/image.js +0 -153
  186. package/dist/cli/core/index.d.ts +0 -16
  187. package/dist/cli/core/index.d.ts.map +0 -1
  188. package/dist/cli/core/index.js +0 -15
  189. package/dist/cli/core/init.d.ts +0 -9
  190. package/dist/cli/core/init.d.ts.map +0 -1
  191. package/dist/cli/core/init.js +0 -219
  192. package/dist/cli/core/job.d.ts +0 -9
  193. package/dist/cli/core/job.d.ts.map +0 -1
  194. package/dist/cli/core/job.js +0 -65
  195. package/dist/cli/core/namespace.d.ts +0 -9
  196. package/dist/cli/core/namespace.d.ts.map +0 -1
  197. package/dist/cli/core/namespace.js +0 -67
  198. package/dist/cli/core/prep-build.d.ts +0 -10
  199. package/dist/cli/core/prep-build.d.ts.map +0 -1
  200. package/dist/cli/core/prep-build.js +0 -109
  201. package/dist/cli/core/registry.d.ts +0 -9
  202. package/dist/cli/core/registry.d.ts.map +0 -1
  203. package/dist/cli/core/registry.js +0 -66
  204. package/dist/cli/core/run-many.d.ts +0 -10
  205. package/dist/cli/core/run-many.d.ts.map +0 -1
  206. package/dist/cli/core/run-many.js +0 -48
  207. package/dist/cli/core/run.d.ts +0 -9
  208. package/dist/cli/core/run.d.ts.map +0 -1
  209. package/dist/cli/core/run.js +0 -35
  210. package/dist/cli/core/test.d.ts +0 -9
  211. package/dist/cli/core/test.d.ts.map +0 -1
  212. package/dist/cli/core/test.js +0 -26
  213. package/dist/cli/extensions/dml.d.ts +0 -9
  214. package/dist/cli/extensions/dml.d.ts.map +0 -1
  215. package/dist/cli/extensions/dml.js +0 -114
  216. package/dist/cli/extensions/index.d.ts +0 -9
  217. package/dist/cli/extensions/index.d.ts.map +0 -1
  218. package/dist/cli/extensions/index.js +0 -8
  219. package/dist/cli/extensions/internal-curl.d.ts +0 -10
  220. package/dist/cli/extensions/internal-curl.d.ts.map +0 -1
  221. package/dist/cli/extensions/internal-curl.js +0 -41
  222. package/dist/cli/extensions/jwt.d.ts +0 -9
  223. package/dist/cli/extensions/jwt.d.ts.map +0 -1
  224. package/dist/cli/extensions/jwt.js +0 -25
  225. package/dist/cli/extensions/prisma.d.ts +0 -9
  226. package/dist/cli/extensions/prisma.d.ts.map +0 -1
  227. package/dist/cli/extensions/prisma.js +0 -23
  228. package/dist/cli/extensions/redis-bitnami.d.ts +0 -11
  229. package/dist/cli/extensions/redis-bitnami.d.ts.map +0 -1
  230. package/dist/cli/extensions/redis-bitnami.js +0 -74
  231. package/dist/cli/extensions/redis-ha.d.ts +0 -11
  232. package/dist/cli/extensions/redis-ha.d.ts.map +0 -1
  233. package/dist/cli/extensions/redis-ha.js +0 -51
  234. package/dist/cli/extensions/stackgres.d.ts +0 -10
  235. package/dist/cli/extensions/stackgres.d.ts.map +0 -1
  236. package/dist/cli/extensions/stackgres.js +0 -117
  237. package/dist/cli/extensions/template.d.ts +0 -9
  238. package/dist/cli/extensions/template.d.ts.map +0 -1
  239. package/dist/cli/extensions/template.js +0 -121
  240. package/dist/devops.d.ts.map +0 -1
  241. package/dist/index.d.ts.map +0 -1
  242. package/dist/libs/affected-entities.d.ts +0 -15
  243. package/dist/libs/affected-entities.d.ts.map +0 -1
  244. package/dist/libs/affected-entities.js +0 -52
  245. package/dist/libs/cloudrun-helpers.d.ts +0 -16
  246. package/dist/libs/cloudrun-helpers.d.ts.map +0 -1
  247. package/dist/libs/cloudrun-helpers.js +0 -81
  248. package/dist/libs/config.d.ts +0 -7
  249. package/dist/libs/config.d.ts.map +0 -1
  250. package/dist/libs/config.js +0 -102
  251. package/dist/libs/digital-ocean/container-reg.d.ts +0 -6
  252. package/dist/libs/digital-ocean/container-reg.d.ts.map +0 -1
  253. package/dist/libs/digital-ocean/container-reg.js +0 -74
  254. package/dist/libs/discovery/dependencies.d.ts +0 -19
  255. package/dist/libs/discovery/dependencies.d.ts.map +0 -1
  256. package/dist/libs/discovery/dependencies.js +0 -62
  257. package/dist/libs/discovery/dependencies.spec.d.ts +0 -2
  258. package/dist/libs/discovery/dependencies.spec.d.ts.map +0 -1
  259. package/dist/libs/discovery/dependencies.spec.js +0 -21
  260. package/dist/libs/discovery/images.d.ts +0 -5
  261. package/dist/libs/discovery/images.d.ts.map +0 -1
  262. package/dist/libs/discovery/images.js +0 -45
  263. package/dist/libs/discovery/index.d.ts +0 -6
  264. package/dist/libs/discovery/index.d.ts.map +0 -1
  265. package/dist/libs/discovery/index.js +0 -67
  266. package/dist/libs/discovery/process-common.d.ts +0 -25
  267. package/dist/libs/discovery/process-common.d.ts.map +0 -1
  268. package/dist/libs/discovery/process-common.js +0 -40
  269. package/dist/libs/discovery/process-package-json.d.ts +0 -3
  270. package/dist/libs/discovery/process-package-json.d.ts.map +0 -1
  271. package/dist/libs/discovery/process-package-json.js +0 -40
  272. package/dist/libs/discovery/process-pyproject-toml.d.ts +0 -3
  273. package/dist/libs/discovery/process-pyproject-toml.d.ts.map +0 -1
  274. package/dist/libs/discovery/process-pyproject-toml.js +0 -49
  275. package/dist/libs/git-helpers.d.ts +0 -8
  276. package/dist/libs/git-helpers.d.ts.map +0 -1
  277. package/dist/libs/git-helpers.js +0 -20
  278. package/dist/libs/hetzner/reg-secret.d.ts +0 -3
  279. package/dist/libs/hetzner/reg-secret.d.ts.map +0 -1
  280. package/dist/libs/hetzner/reg-secret.js +0 -39
  281. package/dist/libs/init-generator.d.ts +0 -41
  282. package/dist/libs/init-generator.d.ts.map +0 -1
  283. package/dist/libs/init-generator.js +0 -123
  284. package/dist/libs/k8s-constants.d.ts +0 -13
  285. package/dist/libs/k8s-constants.d.ts.map +0 -1
  286. package/dist/libs/k8s-constants.js +0 -91
  287. package/dist/libs/k8s-db.d.ts +0 -18
  288. package/dist/libs/k8s-db.d.ts.map +0 -1
  289. package/dist/libs/k8s-db.js +0 -73
  290. package/dist/libs/k8s-generate.d.ts +0 -17
  291. package/dist/libs/k8s-generate.d.ts.map +0 -1
  292. package/dist/libs/k8s-generate.js +0 -193
  293. package/dist/libs/k8s-helpers.d.ts +0 -11
  294. package/dist/libs/k8s-helpers.d.ts.map +0 -1
  295. package/dist/libs/k8s-helpers.js +0 -42
  296. package/dist/libs/k8s-image-config.d.ts +0 -8
  297. package/dist/libs/k8s-image-config.d.ts.map +0 -1
  298. package/dist/libs/k8s-image-config.js +0 -113
  299. package/dist/libs/k8s-job-waiter.d.ts +0 -8
  300. package/dist/libs/k8s-job-waiter.d.ts.map +0 -1
  301. package/dist/libs/k8s-job-waiter.js +0 -84
  302. package/dist/libs/k8s-namespace.d.ts +0 -7
  303. package/dist/libs/k8s-namespace.d.ts.map +0 -1
  304. package/dist/libs/k8s-namespace.js +0 -27
  305. package/dist/libs/k8s-redis-bitnami.d.ts +0 -6
  306. package/dist/libs/k8s-redis-bitnami.d.ts.map +0 -1
  307. package/dist/libs/k8s-redis-bitnami.js +0 -31
  308. package/dist/libs/k8s-redis-ha.d.ts +0 -3
  309. package/dist/libs/k8s-redis-ha.d.ts.map +0 -1
  310. package/dist/libs/k8s-redis-ha.js +0 -15
  311. package/dist/libs/k8s-secrets-manager.d.ts +0 -6
  312. package/dist/libs/k8s-secrets-manager.d.ts.map +0 -1
  313. package/dist/libs/k8s-secrets-manager.js +0 -64
  314. package/dist/libs/validate-env.d.ts +0 -56
  315. package/dist/libs/validate-env.d.ts.map +0 -1
  316. package/dist/libs/validate-env.js +0 -214
  317. package/dist/libs/validate-env.spec.d.ts +0 -2
  318. package/dist/libs/validate-env.spec.d.ts.map +0 -1
  319. package/dist/libs/validate-env.spec.js +0 -168
  320. package/dist/plugins.d.ts.map +0 -1
  321. package/dist/types/index.d.ts +0 -939
  322. package/dist/types/index.d.ts.map +0 -1
  323. package/dist/types/index.js +0 -82
@@ -0,0 +1,38 @@
1
+ import httpx
2
+
3
+ from prefect import flow, task # Prefect flow and task decorators
4
+
5
+
6
+ @flow(log_prints=True)
7
+ def show_stars(github_repos: list[str]):
8
+ """Flow: Show the number of stars that GitHub repos have"""
9
+ for repo in github_repos:
10
+ # Call Task 1
11
+ repo_stats = fetch_stats(repo)
12
+
13
+ # Call Task 2
14
+ stars = get_stars(repo_stats)
15
+
16
+ # Print the result
17
+ print(f"{repo}: {stars} stars")
18
+
19
+
20
+ @task
21
+ def fetch_stats(github_repo: str):
22
+ """Task 1: Fetch the statistics for a GitHub repo"""
23
+ return httpx.get(f"https://api.github.com/repos/{github_repo}").json()
24
+
25
+
26
+ @task
27
+ def get_stars(repo_stats: dict):
28
+ """Task 2: Get the number of stars from GitHub repo statistics"""
29
+ return repo_stats['stargazers_count']
30
+
31
+
32
+ # Run the flow
33
+ if __name__ == "__main__":
34
+ show_stars.serve(
35
+ name="Show Stars",
36
+ parameters={"github_repos": ["PrefectHQ/prefect", "pydantic/pydantic", "huggingface/transformers"]},
37
+ interval=60*60
38
+ )
@@ -0,0 +1,20 @@
1
+ [project]
2
+ name = "example-python"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = []
6
+ requires-python = ">=3.12"
7
+ dependencies = ["example-python-lib", "fastapi[standard]"]
8
+
9
+ [tool.devops.scripts]
10
+ dev = "python -c 'from src.example_python.scripts import dev; dev()'"
11
+ start = "python -c 'from src.example_python.scripts import start; start()'"
12
+
13
+ [tool.uv.sources]
14
+ example-python-lib = { workspace = true }
15
+
16
+
17
+ [tool.devops.deployment]
18
+ template = "external-service"
19
+ service_name = "example-python"
20
+ port = 3002
@@ -0,0 +1,13 @@
1
+ import os
2
+ from fastapi import FastAPI
3
+
4
+ app = FastAPI()
5
+
6
+
7
+ @app.get("/")
8
+ def read_root():
9
+ return "Hello from python"
10
+
11
+ @app.get("/healthz")
12
+ def healthz():
13
+ return {"status": "ok"}
@@ -0,0 +1,17 @@
1
+ import subprocess
2
+ from devops_runner_python.pyproject import get_pyproject_data
3
+
4
+ package_name = "example_python"
5
+ data = get_pyproject_data()
6
+ port = data.deployment["port"]
7
+ workers = data.deployment.get("workers")
8
+
9
+ def dev():
10
+ subprocess.run(["fastapi", "dev", f"src/{package_name}/main.py", "--port", str(port)], check=True)
11
+
12
+ def start():
13
+ cmd = ["fastapi", "run", f"src/{package_name}/main.py", "--port", str(port)]
14
+ if (workers):
15
+ cmd.extend(["--workers", str(workers)])
16
+
17
+ subprocess.run(cmd, check=True)
@@ -0,0 +1,3 @@
1
+ #! /usr/bin/env bash
2
+
3
+ uv run devopspy "$@"
@@ -0,0 +1,11 @@
1
+ [project]
2
+ name = "example-python-lib"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = []
6
+ requires-python = ">=3.12"
7
+ dependencies = []
8
+
9
+ [build-system]
10
+ requires = ["hatchling"]
11
+ build-backend = "hatchling.build"
@@ -0,0 +1,16 @@
1
+ [project]
2
+ name = "$PROJECT_NAME"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = []
6
+ readme = "README.md"
7
+ requires-python = ">=3.12"
8
+ dependencies = ["devops-runner-python"]
9
+
10
+ [tool.uv.workspace]
11
+ members = [
12
+ "db",
13
+ "applications/example-data-pipeline",
14
+ "applications/example-python",
15
+ "libs/example-python-lib",
16
+ ]
@@ -0,0 +1,51 @@
1
+ ---
2
+ alwaysApply: true
3
+ ---
4
+
5
+ # Monorepo Structure
6
+
7
+ We have a monorepo setup configured through a global package.json. There is a `./devops` script to execute commands inside typescript packages.
8
+
9
+ ## Structure
10
+
11
+ Packages under `applications` depend on packages under `libs` using `workspace:*` notation from package.json. It makes sense to extract code to packages under `libs` when it is used in more than one application. Applications never rely on other applications.
12
+
13
+ Applications are encouraged to extract private concerns to "local libs" modules. A typical use-case are persistence-related operations (getters and mutations).
14
+
15
+ All web services found under `applications` should respond to a `GET healthz` with status 200.
16
+
17
+ ## Using the devops CLI
18
+
19
+ We use `bun` as our package manager. The `./devops` script is able to run package.json scripts inside a workspace, run a shell process inside a workspace, and execute the tests in a project:
20
+
21
+ ```bash
22
+ # Most important commands
23
+ ./devops run <project-name>:<script-name>
24
+ ./devops exec --in <project-name> <command>
25
+ ./devops test
26
+ ./devops test <project-name>
27
+
28
+ # Examples
29
+ ./devops run my-api:dev
30
+ ./devops exec --in my-api bun add some-package
31
+ ./devops test my-service
32
+
33
+ # To install dependencies on all workspaces in the monorepo, use bun normally
34
+ bun install
35
+ ```
36
+
37
+ `./devops` automatically loads the right env variables, so don't use dotenv.
38
+
39
+ There is no need to `cd` into package directories. Prefer to use `./devops run` and `./devops exec`.
40
+
41
+ ## Testing
42
+
43
+ Use vitest.
44
+
45
+ **Always run tests with `./devops test`** to ensure the test environment is used.
46
+
47
+ ## Inter-service Communication
48
+
49
+ This repo runs in kubernetes and localhost contexts, which means the endpoint URLs will be different depending on the context. To communicate between services, the package `@vaharoni/devops` exports `function getServiceEndpoint(serviceName: string): string`. This function does not return a trailing slash. The `serviceName` can be found in the `deployment.service_name` custom key of the `package.json` of the application you wish to send requests to. If this key does not exist, halt and alert the user.
50
+
51
+ However, in general, importing a shared lib is preferred over crossing the wire.
@@ -0,0 +1,69 @@
1
+ # The file structure is as follows:
2
+ #
3
+ # Under `templates` key:
4
+ # <template-key>:
5
+ # copy-common: <boolean>
6
+ # extra-content:
7
+ # - <file-name>
8
+ # - <file-name>
9
+ #
10
+ # Where:
11
+ # <template-key> The identifier of the template.
12
+ # This is used to refer to the template in the images section.
13
+ # copy-common Whether to copy the common Docker files from .devops/docker-images/common to the image.
14
+ # extra-content Any files to include in the image that are not part of the build context. By default, all applications and their dependencies are copied, as well as the
15
+ # content of .devops/docker-images/<image-name>. If you need to include additional files, list them here. These are typically from the root of the project.
16
+ # Files and full folders are supported. Globs (wildcards) are currently not supported.
17
+ #
18
+ #
19
+ # Under `images` key:
20
+ # <image-key>:
21
+ # image-template: <image-template>
22
+ # language: <language>
23
+ # debug-template: <debug-template>
24
+ # can-db-migrate: <boolean>
25
+ # domains:
26
+ # production: <production-domain>
27
+ # staging: <staging-domain>
28
+ # image-extra-content:
29
+ # - <file-name>
30
+ # - <file-name>
31
+ # applications:
32
+ # - <application-name>
33
+ # - <application-name>
34
+ #
35
+ # Where:
36
+ # <image-name> The identifier of the image. Github action should refer to this name in a hard-coded manner when invoking devops scripts.
37
+ # This is also the basis for the name of the image in the registry.
38
+ # image-template The build process copies .devops/docker-images/<image-template>.Dockerfile and .devops/docker-images/<image-template>/ to the image.
39
+ # language The language of the image. Currently only "node" and "python" are supported.
40
+ # debug-template Each image comes with a debug pod that can be acccessed as a console. This is the name of the template to use. Only "debug-console" is currently supported.
41
+ # can-db-migrate Whether this image can be used to run DB migrations. If set to true, the image could be used to run DB migrations if any project that uses this image depends
42
+ # on the db project and if the db project changed.
43
+ # domains The domains for the image. This is used to generate the ingress rules.
44
+ # This can be left out if the image does not have ingress rules, such as a worker image.
45
+ # applications List of applications that use this image. There is no need to specify dependencies - they will be derived as long as they are declared in package.json.
46
+ #
47
+
48
+ templates:
49
+ node-services:
50
+ copy-common: true
51
+ extra-content:
52
+ - devops
53
+ - package.json
54
+ - bun.lock
55
+ - tsconfig.json
56
+
57
+ images:
58
+ main-node:
59
+ image-template: node-services
60
+ language: node
61
+ debug-template: debug-console
62
+ can-db-migrate: true
63
+ domains:
64
+ production: $PRODUCTION_DOMAIN
65
+ staging: $STAGING_DOMAIN
66
+ applications:
67
+ - example-node
68
+ - jobs
69
+
@@ -0,0 +1,31 @@
1
+ FROM node:24-bookworm-slim AS builder
2
+
3
+ RUN apt-get update && apt-get install -y jq curl
4
+
5
+ WORKDIR /app
6
+
7
+ ENV NODE_ENV=production
8
+
9
+ ARG MONOREPO_ENV
10
+ ENV MONOREPO_ENV=${MONOREPO_ENV}
11
+ RUN echo "Building for environment: $MONOREPO_ENV"
12
+
13
+ RUN npm install -g bun
14
+
15
+ # This assumes devops prep-build was called by the host, which creates the config/ folder with necessary env variables
16
+ # that are needed to be statitcally resolved by devops run-many build (e.g. NEXT_PUBLIC_*)
17
+ COPY . .
18
+
19
+ # Install dependencies using bun
20
+ RUN --mount=type=cache,target=/root/.bun/install/cache bun install
21
+
22
+ # This assumes the image has only one application that has a build script which outputs to dist/
23
+ RUN ./devops run-many build
24
+
25
+
26
+ FROM gcr.io/distroless/nodejs24-debian12 AS runner
27
+ WORKDIR /app
28
+ ENV NODE_ENV=production
29
+ COPY --from=builder /app/dist ./dist
30
+ EXPOSE 8080
31
+ CMD ["dist/index.js"]
@@ -0,0 +1,23 @@
1
+ check_env() {
2
+ if [ -z "${MONOREPO_ENV}" ]; then
3
+ echo "ERROR: MONOREPO_ENV does not exist"
4
+ exit 1
5
+ fi
6
+ }
7
+
8
+ setup_config() {
9
+ mkdir -p /app/config
10
+
11
+ if [ -f /etc/kubernetes/secrets/env_json ]; then
12
+ jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' /etc/kubernetes/secrets/env_json > /app/config/.env.global
13
+ else
14
+ echo "WARNING: /etc/kubernetes/secrets/env_json does not exist"
15
+ fi
16
+ }
17
+
18
+ pause_if_no_args() {
19
+ if [ "$1" -eq 0 ]; then
20
+ echo "WARNING: No args provided. Pausing."
21
+ tail -f /dev/null
22
+ fi
23
+ }
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ source "$(dirname "$0")/docker-common.sh"
4
+
5
+ check_env
6
+ setup_config
7
+ pause_if_no_args "$#"
8
+ "$@"
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ source "$(dirname "$0")/docker-common.sh"
4
+
5
+ check_env
6
+ setup_config
7
+ pause_if_no_args "$#"
8
+ ./devops run $1:${2:-start}
@@ -0,0 +1,31 @@
1
+ # FROM node:bookworm-slim
2
+ FROM node:22.4.1-bookworm-slim
3
+
4
+ RUN apt-get update && apt-get install -y jq curl
5
+
6
+ WORKDIR /app
7
+
8
+ ENV NODE_ENV=production
9
+
10
+ ARG MONOREPO_ENV
11
+ ENV MONOREPO_ENV=${MONOREPO_ENV}
12
+ RUN echo "Building for environment: $MONOREPO_ENV"
13
+
14
+ RUN npm install -g bun
15
+
16
+ # This assumes devops prep-build was called by the host, which creates the config/ folder with necessary env variables
17
+ # that are needed to be statitcally resolved by devops run-many build (e.g. NEXT_PUBLIC_*)
18
+ COPY . .
19
+
20
+ # Install dependencies using bun
21
+ RUN --mount=type=cache,target=/root/.bun/install/cache bun install
22
+
23
+ # For prisma client, if used
24
+ RUN ./devops run-many generate
25
+ RUN ./devops run-many build
26
+
27
+ # The config folder will be mounted when the pod starts with up-to-date env variables that are used in runtime by server-side code
28
+ RUN rm -rf config/
29
+
30
+ # Pods may override this entrypoint to `node-exec.sh` using the `command` field in the pod spec.
31
+ ENTRYPOINT [ "./node-run.sh" ]
@@ -0,0 +1,23 @@
1
+ # env.yaml files should be placed in workspace folders, at the same level of their
2
+ # package.json / pyproject.toml file.
3
+ # The env.yaml file contains a list of environment variables the workspace depends on.
4
+ # It is intended to be useful for both humans and machines.
5
+ #
6
+ # You are encouraged to use comments to structure the file and make it easier to read.
7
+ #
8
+ # The commands `./devops run` and `./devops exec` inject the content of the environment files in `config/` into the process.
9
+ # Before executing, they validate the variables present in all applicable env.yaml files. If something is amiss, an error is raised.
10
+ #
11
+ # The file is structured as a YAML array of environment variables.
12
+ # If an environment variable is stated by name only, it is a required string.
13
+ # If it is stated as an object, it can have the following structure:
14
+ # - ENV_NAME: optional # => may be ommitted or empty
15
+ # - ENV_NAME: boolean # => must be either `true` or `false`
16
+ # - ENV_NAME: ["value1", "value2"] # => must be one of the listed values
17
+ #
18
+ # Example:
19
+ # - NEXT_PUBLIC_REQUIRED_MESSAGE
20
+ # - REDIS_PROTOCOL: ["redis", "rediss"]
21
+ # - IS_SPECIAL_FEATURE_AVAILABLE: boolean
22
+ # - MESSAGE_OVERRIDE: optional
23
+ #
@@ -0,0 +1,19 @@
1
+ # db-migrate is a required entry that is hard-coded in the devops-cli
2
+ # The debug template used per image is dynamic and can be configured in images.yaml
3
+ # The deployment template used per application is dynamic and can be configured in its package.json
4
+
5
+ db-migrate:
6
+ - db-migrate-job.yaml.hb
7
+ debug-console:
8
+ - deployment-debug.yaml.hb
9
+ cron-jobs:
10
+ - cron-jobs.yaml.hb
11
+ backend-process:
12
+ - deployment-process.yaml.hb
13
+ internal-service:
14
+ - deployment-web.yaml.hb
15
+ - service.yaml.hb
16
+ external-service:
17
+ - deployment-web.yaml.hb
18
+ - service.yaml.hb
19
+ - ingress.yaml.hb
@@ -0,0 +1,56 @@
1
+ {{#each cronJobs}}
2
+ apiVersion: batch/v1
3
+ kind: CronJob
4
+ metadata:
5
+ labels:
6
+ app: {{../app_name}}
7
+ env: {{../monorepo_env}}
8
+ name: {{name}}
9
+ namespace: {{../namespace}}
10
+ spec:
11
+ schedule: "{{cron}}"
12
+ jobTemplate:
13
+ spec:
14
+ ttlSecondsAfterFinished: 86400
15
+ template:
16
+ spec:
17
+ volumes:
18
+ - name: secret-injection-hook
19
+ secret:
20
+ secretName: {{../env_secret_name}}
21
+ containers:
22
+ - image: {{../image_path}}
23
+ name: {{name}}
24
+ command:
25
+ - ./node-exec.sh
26
+ args:
27
+ - ./devops
28
+ - internal-curl
29
+ {{#each curl}}
30
+ - {{this}}
31
+ {{/each}}
32
+ env:
33
+ - name: MONOREPO_ENV
34
+ value: {{../monorepo_env}}
35
+ - name: MONOREPO_NAMESPACE
36
+ value: {{../namespace}}
37
+ - name: IS_KUBERNETES
38
+ value: 'true'
39
+ - name: MONOREPO_BASE_SECRET
40
+ valueFrom:
41
+ secretKeyRef:
42
+ name: {{../env_secret_name}}
43
+ key: {{../env_base_secret_key}}
44
+ volumeMounts:
45
+ - name: secret-injection-hook
46
+ mountPath: /etc/kubernetes/secrets
47
+ readOnly: true
48
+ resources:
49
+ requests:
50
+ memory: 250Mi
51
+ cpu: 100m
52
+ restartPolicy: Never
53
+ {{#unless @last}}
54
+ ---
55
+ {{/unless}}
56
+ {{/each}}
@@ -0,0 +1,43 @@
1
+ apiVersion: batch/v1
2
+ kind: Job
3
+ metadata:
4
+ name: {{db_migrate_job_name}}
5
+ namespace: {{namespace}}
6
+ labels:
7
+ env: {{monorepo_env}}
8
+ spec:
9
+ template:
10
+ spec:
11
+ volumes:
12
+ - name: secret-injection-hook
13
+ secret:
14
+ secretName: {{env_secret_name}}
15
+ containers:
16
+ - name: db-migrate-job
17
+ image: {{image_path}}
18
+ args:
19
+ - db
20
+ - migrate-deploy
21
+ env:
22
+ - name: MONOREPO_ENV
23
+ value: {{monorepo_env}}
24
+ - name: MONOREPO_NAMESPACE
25
+ value: {{namespace}}
26
+ - name: IS_KUBERNETES
27
+ value: 'true'
28
+ - name: MONOREPO_BASE_SECRET
29
+ valueFrom:
30
+ secretKeyRef:
31
+ name: {{env_secret_name}}
32
+ key: {{env_base_secret_key}}
33
+ volumeMounts:
34
+ - name: secret-injection-hook
35
+ mountPath: /etc/kubernetes/secrets
36
+ readOnly: true
37
+ resources:
38
+ requests:
39
+ memory: 100Mi
40
+ cpu: 250m
41
+ restartPolicy: Never
42
+ backoffLimit: 0
43
+ ttlSecondsAfterFinished: 3600
@@ -0,0 +1,42 @@
1
+ apiVersion: v1
2
+ kind: Pod
3
+ metadata:
4
+ # Name and namespace should not be stated - they are provided by the runner
5
+ labels:
6
+ app: {{debug_pod_name}}
7
+ env: {{monorepo_env}}
8
+ ephemeral-shell: "true"
9
+ spec:
10
+ volumes:
11
+ - name: secret-injection-hook
12
+ secret:
13
+ secretName: {{env_secret_name}}
14
+ containers:
15
+ - image: {{image_path}}
16
+ name: {{debug_pod_name}}
17
+ stdin: true
18
+ tty: true
19
+ command:
20
+ - ./node-exec.sh
21
+ args:
22
+ - /bin/bash
23
+ env:
24
+ - name: MONOREPO_ENV
25
+ value: {{monorepo_env}}
26
+ - name: MONOREPO_NAMESPACE
27
+ value: {{namespace}}
28
+ - name: IS_KUBERNETES
29
+ value: 'true'
30
+ - name: MONOREPO_BASE_SECRET
31
+ valueFrom:
32
+ secretKeyRef:
33
+ name: {{env_secret_name}}
34
+ key: {{env_base_secret_key}}
35
+ volumeMounts:
36
+ - name: secret-injection-hook
37
+ mountPath: /etc/kubernetes/secrets
38
+ readOnly: true
39
+ resources:
40
+ requests:
41
+ memory: 250Mi
42
+ cpu: 100m
@@ -0,0 +1,48 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ labels:
5
+ app: {{app_name}}
6
+ env: {{monorepo_env}}
7
+ name: {{app_name}}
8
+ namespace: {{namespace}}
9
+ spec:
10
+ replicas: {{replicas}}
11
+ selector:
12
+ matchLabels:
13
+ app: {{app_name}}
14
+ template:
15
+ metadata:
16
+ labels:
17
+ app: {{app_name}}
18
+ env: {{monorepo_env}}
19
+ spec:
20
+ volumes:
21
+ - name: secret-injection-hook
22
+ secret:
23
+ secretName: {{env_secret_name}}
24
+ containers:
25
+ - image: {{image_path}}
26
+ name: {{app_name}}
27
+ args:
28
+ - "{{project_name}}"
29
+ env:
30
+ - name: MONOREPO_ENV
31
+ value: {{monorepo_env}}
32
+ - name: MONOREPO_NAMESPACE
33
+ value: {{namespace}}
34
+ - name: IS_KUBERNETES
35
+ value: 'true'
36
+ - name: MONOREPO_BASE_SECRET
37
+ valueFrom:
38
+ secretKeyRef:
39
+ name: {{env_secret_name}}
40
+ key: {{env_base_secret_key}}
41
+ volumeMounts:
42
+ - name: secret-injection-hook
43
+ mountPath: /etc/kubernetes/secrets
44
+ readOnly: true
45
+ resources:
46
+ requests:
47
+ memory: 250Mi
48
+ cpu: 250m
@@ -0,0 +1,54 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ labels:
5
+ app: {{app_name}}
6
+ env: {{monorepo_env}}
7
+ name: {{app_name}}
8
+ namespace: {{namespace}}
9
+ spec:
10
+ replicas: {{replicas}}
11
+ selector:
12
+ matchLabels:
13
+ app: {{app_name}}
14
+ template:
15
+ metadata:
16
+ labels:
17
+ app: {{app_name}}
18
+ env: {{monorepo_env}}
19
+ spec:
20
+ volumes:
21
+ - name: secret-injection-hook
22
+ secret:
23
+ secretName: {{env_secret_name}}
24
+ containers:
25
+ - image: {{image_path}}
26
+ name: {{app_name}}
27
+ args:
28
+ - "{{project_name}}"
29
+ env:
30
+ - name: MONOREPO_ENV
31
+ value: {{monorepo_env}}
32
+ - name: MONOREPO_NAMESPACE
33
+ value: {{namespace}}
34
+ - name: IS_KUBERNETES
35
+ value: 'true'
36
+ - name: MONOREPO_BASE_SECRET
37
+ valueFrom:
38
+ secretKeyRef:
39
+ name: {{env_secret_name}}
40
+ key: {{env_base_secret_key}}
41
+ volumeMounts:
42
+ - name: secret-injection-hook
43
+ mountPath: /etc/kubernetes/secrets
44
+ readOnly: true
45
+ startupProbe:
46
+ httpGet:
47
+ path: /healthz
48
+ port: {{port}}
49
+ failureThreshold: 50
50
+ periodSeconds: 2
51
+ resources:
52
+ requests:
53
+ memory: 250Mi
54
+ cpu: 250m