@vaharoni/devops 1.0.47

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 (342) hide show
  1. package/README.md +51 -0
  2. package/dist/app-support/crypto/index.d.ts +15 -0
  3. package/dist/app-support/crypto/index.d.ts.map +1 -0
  4. package/dist/app-support/crypto/index.js +30 -0
  5. package/dist/app-support/crypto/internal-token.d.ts +20 -0
  6. package/dist/app-support/crypto/internal-token.d.ts.map +1 -0
  7. package/dist/app-support/crypto/internal-token.js +42 -0
  8. package/dist/app-support/crypto/internal-token.spec.d.ts +2 -0
  9. package/dist/app-support/crypto/internal-token.spec.d.ts.map +1 -0
  10. package/dist/app-support/crypto/internal-token.spec.js +45 -0
  11. package/dist/app-support/crypto/secret.d.ts +3 -0
  12. package/dist/app-support/crypto/secret.d.ts.map +1 -0
  13. package/dist/app-support/crypto/secret.js +12 -0
  14. package/dist/app-support/crypto/secret.spec.d.ts +2 -0
  15. package/dist/app-support/crypto/secret.spec.d.ts.map +1 -0
  16. package/dist/app-support/crypto/secret.spec.js +15 -0
  17. package/dist/app-support/discovery/dev-discovery-loader.d.ts +2 -0
  18. package/dist/app-support/discovery/dev-discovery-loader.d.ts.map +1 -0
  19. package/dist/app-support/discovery/dev-discovery-loader.js +30 -0
  20. package/dist/app-support/discovery/service-endpoint.d.ts +2 -0
  21. package/dist/app-support/discovery/service-endpoint.d.ts.map +1 -0
  22. package/dist/app-support/discovery/service-endpoint.js +10 -0
  23. package/dist/cli/affected.d.ts +11 -0
  24. package/dist/cli/affected.d.ts.map +1 -0
  25. package/dist/cli/affected.js +103 -0
  26. package/dist/cli/common.d.ts +89 -0
  27. package/dist/cli/common.d.ts.map +1 -0
  28. package/dist/cli/common.js +236 -0
  29. package/dist/cli/common.spec.d.ts +2 -0
  30. package/dist/cli/common.spec.d.ts.map +1 -0
  31. package/dist/cli/common.spec.js +64 -0
  32. package/dist/cli/console.d.ts +11 -0
  33. package/dist/cli/console.d.ts.map +1 -0
  34. package/dist/cli/console.js +35 -0
  35. package/dist/cli/constant.d.ts +11 -0
  36. package/dist/cli/constant.d.ts.map +1 -0
  37. package/dist/cli/constant.js +22 -0
  38. package/dist/cli/db.d.ts +11 -0
  39. package/dist/cli/db.d.ts.map +1 -0
  40. package/dist/cli/db.js +119 -0
  41. package/dist/cli/dml.d.ts +11 -0
  42. package/dist/cli/dml.d.ts.map +1 -0
  43. package/dist/cli/dml.js +116 -0
  44. package/dist/cli/env.d.ts +11 -0
  45. package/dist/cli/env.d.ts.map +1 -0
  46. package/dist/cli/env.js +67 -0
  47. package/dist/cli/exec.d.ts +11 -0
  48. package/dist/cli/exec.d.ts.map +1 -0
  49. package/dist/cli/exec.js +50 -0
  50. package/dist/cli/image.d.ts +11 -0
  51. package/dist/cli/image.d.ts.map +1 -0
  52. package/dist/cli/image.js +140 -0
  53. package/dist/cli/init.d.ts +11 -0
  54. package/dist/cli/init.d.ts.map +1 -0
  55. package/dist/cli/init.js +66 -0
  56. package/dist/cli/internal-curl.d.ts +11 -0
  57. package/dist/cli/internal-curl.d.ts.map +1 -0
  58. package/dist/cli/internal-curl.js +43 -0
  59. package/dist/cli/job.d.ts +11 -0
  60. package/dist/cli/job.d.ts.map +1 -0
  61. package/dist/cli/job.js +67 -0
  62. package/dist/cli/jwt.d.ts +11 -0
  63. package/dist/cli/jwt.d.ts.map +1 -0
  64. package/dist/cli/jwt.js +27 -0
  65. package/dist/cli/namespace.d.ts +11 -0
  66. package/dist/cli/namespace.d.ts.map +1 -0
  67. package/dist/cli/namespace.js +70 -0
  68. package/dist/cli/prep-build.d.ts +11 -0
  69. package/dist/cli/prep-build.d.ts.map +1 -0
  70. package/dist/cli/prep-build.js +82 -0
  71. package/dist/cli/prisma.d.ts +11 -0
  72. package/dist/cli/prisma.d.ts.map +1 -0
  73. package/dist/cli/prisma.js +25 -0
  74. package/dist/cli/redis.d.ts +11 -0
  75. package/dist/cli/redis.d.ts.map +1 -0
  76. package/dist/cli/redis.js +76 -0
  77. package/dist/cli/registry.d.ts +11 -0
  78. package/dist/cli/registry.d.ts.map +1 -0
  79. package/dist/cli/registry.js +58 -0
  80. package/dist/cli/run-many.d.ts +11 -0
  81. package/dist/cli/run-many.d.ts.map +1 -0
  82. package/dist/cli/run-many.js +50 -0
  83. package/dist/cli/run.d.ts +11 -0
  84. package/dist/cli/run.d.ts.map +1 -0
  85. package/dist/cli/run.js +37 -0
  86. package/dist/cli/template.d.ts +11 -0
  87. package/dist/cli/template.d.ts.map +1 -0
  88. package/dist/cli/template.js +123 -0
  89. package/dist/cli/test.d.ts +11 -0
  90. package/dist/cli/test.d.ts.map +1 -0
  91. package/dist/cli/test.js +28 -0
  92. package/dist/devops.d.ts +3 -0
  93. package/dist/devops.d.ts.map +1 -0
  94. package/dist/devops.js +103 -0
  95. package/dist/index.d.ts +4 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/index.js +3 -0
  98. package/dist/libs/affected-entities.d.ts +15 -0
  99. package/dist/libs/affected-entities.d.ts.map +1 -0
  100. package/dist/libs/affected-entities.js +52 -0
  101. package/dist/libs/config.d.ts +6 -0
  102. package/dist/libs/config.d.ts.map +1 -0
  103. package/dist/libs/config.js +98 -0
  104. package/dist/libs/dependencies.d.ts +19 -0
  105. package/dist/libs/dependencies.d.ts.map +1 -0
  106. package/dist/libs/dependencies.js +62 -0
  107. package/dist/libs/dependencies.spec.d.ts +2 -0
  108. package/dist/libs/dependencies.spec.d.ts.map +1 -0
  109. package/dist/libs/dependencies.spec.js +21 -0
  110. package/dist/libs/digital-ocean/container-reg.d.ts +6 -0
  111. package/dist/libs/digital-ocean/container-reg.d.ts.map +1 -0
  112. package/dist/libs/digital-ocean/container-reg.js +69 -0
  113. package/dist/libs/discovery/dependencies.d.ts +19 -0
  114. package/dist/libs/discovery/dependencies.d.ts.map +1 -0
  115. package/dist/libs/discovery/dependencies.js +62 -0
  116. package/dist/libs/discovery/dependencies.spec.d.ts +2 -0
  117. package/dist/libs/discovery/dependencies.spec.d.ts.map +1 -0
  118. package/dist/libs/discovery/dependencies.spec.js +21 -0
  119. package/dist/libs/discovery/images.d.ts +5 -0
  120. package/dist/libs/discovery/images.d.ts.map +1 -0
  121. package/dist/libs/discovery/images.js +45 -0
  122. package/dist/libs/discovery/index.d.ts +5 -0
  123. package/dist/libs/discovery/index.d.ts.map +1 -0
  124. package/dist/libs/discovery/index.js +55 -0
  125. package/dist/libs/discovery/package-json-processor.d.ts +3 -0
  126. package/dist/libs/discovery/package-json-processor.d.ts.map +1 -0
  127. package/dist/libs/discovery/package-json-processor.js +34 -0
  128. package/dist/libs/discovery/process-common.d.ts +25 -0
  129. package/dist/libs/discovery/process-common.d.ts.map +1 -0
  130. package/dist/libs/discovery/process-common.js +40 -0
  131. package/dist/libs/discovery/process-package-json.d.ts +3 -0
  132. package/dist/libs/discovery/process-package-json.d.ts.map +1 -0
  133. package/dist/libs/discovery/process-package-json.js +34 -0
  134. package/dist/libs/discovery/process-pyproject-toml.d.ts +3 -0
  135. package/dist/libs/discovery/process-pyproject-toml.d.ts.map +1 -0
  136. package/dist/libs/discovery/process-pyproject-toml.js +36 -0
  137. package/dist/libs/discovery/pyproject-toml-processor.d.ts +3 -0
  138. package/dist/libs/discovery/pyproject-toml-processor.d.ts.map +1 -0
  139. package/dist/libs/discovery/pyproject-toml-processor.js +39 -0
  140. package/dist/libs/git-helpers.d.ts +8 -0
  141. package/dist/libs/git-helpers.d.ts.map +1 -0
  142. package/dist/libs/git-helpers.js +20 -0
  143. package/dist/libs/hetzner/reg-secret.d.ts +3 -0
  144. package/dist/libs/hetzner/reg-secret.d.ts.map +1 -0
  145. package/dist/libs/hetzner/reg-secret.js +39 -0
  146. package/dist/libs/k8s-constants.d.ts +12 -0
  147. package/dist/libs/k8s-constants.d.ts.map +1 -0
  148. package/dist/libs/k8s-constants.js +66 -0
  149. package/dist/libs/k8s-db.d.ts +18 -0
  150. package/dist/libs/k8s-db.d.ts.map +1 -0
  151. package/dist/libs/k8s-db.js +73 -0
  152. package/dist/libs/k8s-generate.d.ts +17 -0
  153. package/dist/libs/k8s-generate.d.ts.map +1 -0
  154. package/dist/libs/k8s-generate.js +179 -0
  155. package/dist/libs/k8s-helpers.d.ts +11 -0
  156. package/dist/libs/k8s-helpers.d.ts.map +1 -0
  157. package/dist/libs/k8s-helpers.js +42 -0
  158. package/dist/libs/k8s-image-config.d.ts +8 -0
  159. package/dist/libs/k8s-image-config.d.ts.map +1 -0
  160. package/dist/libs/k8s-image-config.js +113 -0
  161. package/dist/libs/k8s-job-waiter.d.ts +8 -0
  162. package/dist/libs/k8s-job-waiter.d.ts.map +1 -0
  163. package/dist/libs/k8s-job-waiter.js +84 -0
  164. package/dist/libs/k8s-namespace.d.ts +7 -0
  165. package/dist/libs/k8s-namespace.d.ts.map +1 -0
  166. package/dist/libs/k8s-namespace.js +27 -0
  167. package/dist/libs/k8s-redis.d.ts +6 -0
  168. package/dist/libs/k8s-redis.d.ts.map +1 -0
  169. package/dist/libs/k8s-redis.js +31 -0
  170. package/dist/libs/k8s-secrets-manager.d.ts +5 -0
  171. package/dist/libs/k8s-secrets-manager.d.ts.map +1 -0
  172. package/dist/libs/k8s-secrets-manager.js +61 -0
  173. package/dist/libs/validate-env.d.ts +56 -0
  174. package/dist/libs/validate-env.d.ts.map +1 -0
  175. package/dist/libs/validate-env.js +214 -0
  176. package/dist/libs/validate-env.spec.d.ts +2 -0
  177. package/dist/libs/validate-env.spec.d.ts.map +1 -0
  178. package/dist/libs/validate-env.spec.js +168 -0
  179. package/dist/libs/workspace-discovery.d.ts +2 -0
  180. package/dist/libs/workspace-discovery.d.ts.map +1 -0
  181. package/dist/libs/workspace-discovery.js +75 -0
  182. package/dist/test.d.ts +2 -0
  183. package/dist/test.d.ts.map +1 -0
  184. package/dist/test.js +1 -0
  185. package/dist/types/index.d.ts +925 -0
  186. package/dist/types/index.d.ts.map +1 -0
  187. package/dist/types/index.js +79 -0
  188. package/package.json +55 -0
  189. package/src/app-support/crypto/index.ts +31 -0
  190. package/src/app-support/crypto/internal-token.spec.ts +53 -0
  191. package/src/app-support/crypto/internal-token.ts +82 -0
  192. package/src/app-support/crypto/secret.spec.ts +18 -0
  193. package/src/app-support/crypto/secret.ts +13 -0
  194. package/src/app-support/discovery/dev-discovery-loader.ts +35 -0
  195. package/src/app-support/discovery/service-endpoint.ts +12 -0
  196. package/src/cli/affected.ts +116 -0
  197. package/src/cli/common.spec.ts +78 -0
  198. package/src/cli/common.ts +323 -0
  199. package/src/cli/console.ts +46 -0
  200. package/src/cli/constant.ts +25 -0
  201. package/src/cli/db.ts +133 -0
  202. package/src/cli/dml.ts +126 -0
  203. package/src/cli/env.ts +87 -0
  204. package/src/cli/exec.sh +21 -0
  205. package/src/cli/exec.ts +57 -0
  206. package/src/cli/image.ts +197 -0
  207. package/src/cli/init.ts +75 -0
  208. package/src/cli/internal-curl.ts +48 -0
  209. package/src/cli/job.ts +80 -0
  210. package/src/cli/jwt.ts +32 -0
  211. package/src/cli/namespace.ts +78 -0
  212. package/src/cli/prep-build.ts +96 -0
  213. package/src/cli/prisma.ts +33 -0
  214. package/src/cli/redis.ts +83 -0
  215. package/src/cli/registry.ts +76 -0
  216. package/src/cli/run-many.ts +61 -0
  217. package/src/cli/run.ts +46 -0
  218. package/src/cli/template.ts +169 -0
  219. package/src/cli/test.ts +30 -0
  220. package/src/devops.ts +119 -0
  221. package/src/index.ts +3 -0
  222. package/src/libs/affected-entities.ts +71 -0
  223. package/src/libs/config.ts +117 -0
  224. package/src/libs/digital-ocean/container-reg.ts +81 -0
  225. package/src/libs/discovery/dependencies.spec.ts +25 -0
  226. package/src/libs/discovery/dependencies.ts +73 -0
  227. package/src/libs/discovery/images.ts +57 -0
  228. package/src/libs/discovery/index.ts +60 -0
  229. package/src/libs/discovery/process-common.ts +55 -0
  230. package/src/libs/discovery/process-package-json.ts +47 -0
  231. package/src/libs/discovery/process-pyproject-toml.ts +43 -0
  232. package/src/libs/git-helpers.ts +32 -0
  233. package/src/libs/hetzner/reg-secret.ts +54 -0
  234. package/src/libs/k8s-constants.ts +83 -0
  235. package/src/libs/k8s-db.ts +83 -0
  236. package/src/libs/k8s-generate.ts +211 -0
  237. package/src/libs/k8s-helpers.ts +59 -0
  238. package/src/libs/k8s-image-config.ts +165 -0
  239. package/src/libs/k8s-job-waiter.ts +124 -0
  240. package/src/libs/k8s-namespace.ts +41 -0
  241. package/src/libs/k8s-redis.ts +31 -0
  242. package/src/libs/k8s-secrets-manager.ts +79 -0
  243. package/src/libs/validate-env.spec.ts +223 -0
  244. package/src/libs/validate-env.ts +266 -0
  245. package/src/target-templates/.devops/config/constants.yaml +17 -0
  246. package/src/target-templates/.devops/config/images.yaml +88 -0
  247. package/src/target-templates/.devops/docker-images/common/docker-common.sh +23 -0
  248. package/src/target-templates/.devops/docker-images/node-services/node-exec.sh +8 -0
  249. package/src/target-templates/.devops/docker-images/node-services/node-run.sh +8 -0
  250. package/src/target-templates/.devops/docker-images/node-services.Dockerfile +34 -0
  251. package/src/target-templates/.devops/docker-images/python-services/python-exec.sh +8 -0
  252. package/src/target-templates/.devops/docker-images/python-services/python-run.sh +8 -0
  253. package/src/target-templates/.devops/docker-images/python-services.Dockerfile +29 -0
  254. package/src/target-templates/.devops/env.example.yaml +23 -0
  255. package/src/target-templates/.devops/infra/hetzner/abandoned/harbor-values.yaml +30 -0
  256. package/src/target-templates/.devops/infra/hetzner/abandoned/hcloud-config.yaml +134 -0
  257. package/src/target-templates/.devops/infra/hetzner/cert-manager.yaml +25 -0
  258. package/src/target-templates/.devops/infra/hetzner/harbor-cert.yaml +13 -0
  259. package/src/target-templates/.devops/infra/hetzner/harbor-values.yaml +76 -0
  260. package/src/target-templates/.devops/infra/hetzner/hcloud-config.yaml +113 -0
  261. package/src/target-templates/.devops/infra/hetzner/ingress-nginx-annotations.yaml +49 -0
  262. package/src/target-templates/.devops/infra/hetzner/ingress-nginx-configmap.yaml +8 -0
  263. package/src/target-templates/.devops/infra/hetzner/retain-storage-class.yaml +8 -0
  264. package/src/target-templates/.devops/infra/monitoring-ingress.yaml +62 -0
  265. package/src/target-templates/.devops/infra/stackgres-ui-ingress.yaml +35 -0
  266. package/src/target-templates/.devops/infra/test.yaml +60 -0
  267. package/src/target-templates/.devops/manifests/_index.yaml +21 -0
  268. package/src/target-templates/.devops/manifests/cron-jobs.yaml.hb +55 -0
  269. package/src/target-templates/.devops/manifests/db-migrate-job.yaml.hb +42 -0
  270. package/src/target-templates/.devops/manifests/deployment-debug.yaml.hb +44 -0
  271. package/src/target-templates/.devops/manifests/deployment-process.yaml.hb +47 -0
  272. package/src/target-templates/.devops/manifests/deployment-web.yaml.hb +53 -0
  273. package/src/target-templates/.devops/manifests/ingress.yaml.hb +21 -0
  274. package/src/target-templates/.devops/manifests/prefect.yaml.hb +62 -0
  275. package/src/target-templates/.devops/manifests/service.yaml.hb +15 -0
  276. package/src/target-templates/.devops/milvus/production/milvus-values.yaml +2 -0
  277. package/src/target-templates/.devops/milvus/staging/milvus-values.yaml +2 -0
  278. package/src/target-templates/.devops/postgres/DailyOperatorRestart.yaml +54 -0
  279. package/src/target-templates/.devops/postgres/production/cluster/PodDisruptionBudget.yaml +27 -0
  280. package/src/target-templates/.devops/postgres/production/cluster/SGCluster.yaml +47 -0
  281. package/src/target-templates/.devops/postgres/production/cluster/StackGres-alerts.yaml +191 -0
  282. package/src/target-templates/.devops/postgres/production/configurations/06-SGDistributedLogs.yaml +11 -0
  283. package/src/target-templates/.devops/postgres/production/configurations/07-SGObjectStorage.yaml +18 -0
  284. package/src/target-templates/.devops/postgres/production/configurations/08-SGScript.yaml +12 -0
  285. package/src/target-templates/.devops/postgres/staging/cluster/SGCluster.yaml +42 -0
  286. package/src/target-templates/.devops/postgres/staging/configurations/07-SGObjectStorage.yaml +18 -0
  287. package/src/target-templates/.devops/postgres/staging/configurations/08-SGScript.yaml +12 -0
  288. package/src/target-templates/.devops/prefect/production/prefect-values.yaml +14 -0
  289. package/src/target-templates/.devops/prefect/staging/prefect-values.yaml +14 -0
  290. package/src/target-templates/.devops/redis/production/redis-values.yaml +20 -0
  291. package/src/target-templates/.devops/redis/staging/redis-values.yaml +8 -0
  292. package/src/target-templates/.envrc +5 -0
  293. package/src/target-templates/.github/actions/build-image@v1/action.yaml +86 -0
  294. package/src/target-templates/.github/actions/connect-to-digital-ocean@v1/action.yaml +29 -0
  295. package/src/target-templates/.github/actions/connect-to-hetzner@v1/action.yaml +31 -0
  296. package/src/target-templates/.github/actions/connect-to-infra@v1/action.yaml +46 -0
  297. package/src/target-templates/.github/actions/db-migrate@v1/action.yaml +23 -0
  298. package/src/target-templates/.github/actions/deploy-image@v1/action.yaml +33 -0
  299. package/src/target-templates/.github/actions/setup-prereq@v1/action.yaml +29 -0
  300. package/src/target-templates/.github/workflows/k8s-build.yaml +84 -0
  301. package/src/target-templates/applications/example-data-pipeline/pyproject.toml +14 -0
  302. package/src/target-templates/applications/example-data-pipeline/src/example_data_pipeline/main.py +38 -0
  303. package/src/target-templates/applications/example-node/index.ts +30 -0
  304. package/src/target-templates/applications/example-node/package.json +26 -0
  305. package/src/target-templates/applications/example-node/tsconfig.json +3 -0
  306. package/src/target-templates/applications/example-python/pyproject.toml +20 -0
  307. package/src/target-templates/applications/example-python/src/example_python/__init__.py +0 -0
  308. package/src/target-templates/applications/example-python/src/example_python/main.py +13 -0
  309. package/src/target-templates/applications/example-python/src/example_python/scripts.py +17 -0
  310. package/src/target-templates/applications/example-python/tests/__init__.py +0 -0
  311. package/src/target-templates/applications/jobs/README.md +68 -0
  312. package/src/target-templates/applications/jobs/index.ts +1 -0
  313. package/src/target-templates/applications/jobs/package.json +30 -0
  314. package/src/target-templates/applications/jobs/tsconfig.json +3 -0
  315. package/src/target-templates/config/.env.development +1 -0
  316. package/src/target-templates/config/.env.global +4 -0
  317. package/src/target-templates/config/.env.test +1 -0
  318. package/src/target-templates/db/db/__init__.py +0 -0
  319. package/src/target-templates/db/db/db_client_test.py +46 -0
  320. package/src/target-templates/db/db-client-test.ts +140 -0
  321. package/src/target-templates/db/db-client.ts +19 -0
  322. package/src/target-templates/db/env.yaml +4 -0
  323. package/src/target-templates/db/package.json +17 -0
  324. package/src/target-templates/db/prisma/schema.prisma +24 -0
  325. package/src/target-templates/db/prisma-setup-vitest.ts +27 -0
  326. package/src/target-templates/db/pyproject.toml +14 -0
  327. package/src/target-templates/db/tsconfig.json +3 -0
  328. package/src/target-templates/devops +3 -0
  329. package/src/target-templates/devopspy +3 -0
  330. package/src/target-templates/dml/package.json +7 -0
  331. package/src/target-templates/dml/tsconfig.json +3 -0
  332. package/src/target-templates/libs/example-node-lib/bun.lock +27 -0
  333. package/src/target-templates/libs/example-node-lib/index.ts +3 -0
  334. package/src/target-templates/libs/example-node-lib/package.json +12 -0
  335. package/src/target-templates/libs/example-node-lib/tsconfig.json +3 -0
  336. package/src/target-templates/libs/example-python-lib/pyproject.toml +11 -0
  337. package/src/target-templates/libs/example-python-lib/src/example_python_lib/__init__.py +2 -0
  338. package/src/target-templates/pyproject.toml +19 -0
  339. package/src/target-templates/tmp/.gitkeep +0 -0
  340. package/src/target-templates/tsconfig.json +27 -0
  341. package/src/test.ts +0 -0
  342. package/src/types/index.ts +173 -0
@@ -0,0 +1,25 @@
1
+ apiVersion: v1
2
+ kind: Secret
3
+ metadata:
4
+ name: cloudflare-api-token-secret
5
+ namespace: cert-manager
6
+ type: Opaque
7
+ stringData:
8
+ api-token: $CLOUDFLARE_API_TOKEN
9
+ ---
10
+ apiVersion: cert-manager.io/v1
11
+ kind: ClusterIssuer
12
+ metadata:
13
+ name: letsencrypt-dns01
14
+ spec:
15
+ acme:
16
+ server: https://acme-v02.api.letsencrypt.org/directory
17
+ email: $EMAIL_ADDRESS
18
+ privateKeySecretRef:
19
+ name: letsencrypt-dns01-private-key
20
+ solvers:
21
+ - dns01:
22
+ cloudflare:
23
+ apiTokenSecretRef:
24
+ name: cloudflare-api-token-secret
25
+ key: api-token
@@ -0,0 +1,13 @@
1
+ apiVersion: cert-manager.io/v1
2
+ kind: Certificate
3
+ metadata:
4
+ name: tls-secret
5
+ namespace: harbor
6
+ spec:
7
+ secretName: tls-secret
8
+ issuerRef:
9
+ name: letsencrypt-dns01
10
+ kind: ClusterIssuer
11
+ commonName: $REGISTRY_DOMAIN
12
+ dnsNames:
13
+ - $REGISTRY_DOMAIN
@@ -0,0 +1,76 @@
1
+ expose:
2
+ type: ingress
3
+ ingress:
4
+ hosts:
5
+ core: $REGISTRY_DOMAIN
6
+ tls:
7
+ certSource: secret
8
+ secret:
9
+ secretName: tls-secret
10
+ externalURL: https://$REGISTRY_DOMAIN
11
+ persistence:
12
+ enabled: true
13
+ persistentVolumeClaim:
14
+ registry:
15
+ storageClass: "hcloud-volumes"
16
+ accessMode: ReadWriteOnce
17
+ size: 20Gi
18
+ jobservice:
19
+ storageClass: "hcloud-volumes"
20
+ accessMode: ReadWriteOnce
21
+ size: 5Gi
22
+ chartmuseum:
23
+ storageClass: "hcloud-volumes"
24
+ accessMode: ReadWriteOnce
25
+ size: 5Gi
26
+ database:
27
+ internal:
28
+ livenessProbe:
29
+ timeoutSeconds: 5
30
+ readinessProbe:
31
+ timeoutSeconds: 5
32
+ core:
33
+ livenessProbe:
34
+ initialDelaySeconds: 10
35
+ periodSeconds: 10
36
+ timeoutSeconds: 5
37
+ failureThreshold: 3
38
+ readinessProbe:
39
+ initialDelaySeconds: 5
40
+ periodSeconds: 10
41
+ timeoutSeconds: 5
42
+ failureThreshold: 3
43
+ jobservice:
44
+ livenessProbe:
45
+ initialDelaySeconds: 10
46
+ periodSeconds: 10
47
+ timeoutSeconds: 5
48
+ failureThreshold: 3
49
+ readinessProbe:
50
+ initialDelaySeconds: 5
51
+ periodSeconds: 10
52
+ timeoutSeconds: 5
53
+ failureThreshold: 3
54
+ registry:
55
+ registry:
56
+ livenessProbe:
57
+ initialDelaySeconds: 10
58
+ periodSeconds: 10
59
+ timeoutSeconds: 5
60
+ failureThreshold: 3
61
+ readinessProbe:
62
+ initialDelaySeconds: 5
63
+ periodSeconds: 10
64
+ timeoutSeconds: 5
65
+ failureThreshold: 3
66
+ controller:
67
+ livenessProbe:
68
+ initialDelaySeconds: 10
69
+ periodSeconds: 10
70
+ timeoutSeconds: 5
71
+ failureThreshold: 3
72
+ readinessProbe:
73
+ initialDelaySeconds: 5
74
+ periodSeconds: 10
75
+ timeoutSeconds: 5
76
+ failureThreshold: 3
@@ -0,0 +1,113 @@
1
+ ---
2
+ cluster_name: changeme
3
+ kubeconfig_path: "./config/kubeconfig"
4
+ k3s_version: v1.32.2+k3s1
5
+
6
+ networking:
7
+ ssh:
8
+ port: 22
9
+ use_agent: false # set to true if your key has a passphrase
10
+ public_key_path: "~/.ssh/id_hcloud.pub"
11
+ private_key_path: "~/.ssh/id_hcloud"
12
+ allowed_networks:
13
+ ssh:
14
+ - 0.0.0.0/0
15
+ api: # this will firewall port 6443 on the nodes
16
+ - 0.0.0.0/0
17
+ public_network:
18
+ ipv4: true
19
+ ipv6: true
20
+ private_network:
21
+ enabled: true
22
+ subnet: 10.0.0.0/16
23
+ existing_network_name: ""
24
+ cni:
25
+ enabled: true
26
+ encryption: false
27
+ mode: flannel
28
+
29
+ # cluster_cidr: 10.244.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for pod IPs
30
+ # service_cidr: 10.43.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for service IPs. Warning, if you change this, you should also change cluster_dns!
31
+ # cluster_dns: 10.43.0.10 # optional: IPv4 Cluster IP for coredns service. Needs to be an address from the service_cidr range
32
+
33
+
34
+ # manifests:
35
+ # cloud_controller_manager_manifest_url: "https://github.com/hetznercloud/hcloud-cloud-controller-manager/releases/download/v1.23.0/ccm-networks.yaml"
36
+ # csi_driver_manifest_url: "https://raw.githubusercontent.com/hetznercloud/csi-driver/v2.12.0/deploy/kubernetes/hcloud-csi.yml"
37
+ # system_upgrade_controller_deployment_manifest_url: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.14.2/system-upgrade-controller.yaml"
38
+ # system_upgrade_controller_crd_manifest_url: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.14.2/crd.yaml"
39
+ # cluster_autoscaler_manifest_url: "https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml"
40
+ # cluster_autoscaler_container_image_tag: "v1.32.0"
41
+
42
+ # datastore:
43
+ # mode: etcd # etcd (default) or external
44
+ # external_datastore_endpoint: postgres://....
45
+
46
+ schedule_workloads_on_masters: false
47
+
48
+ # image: rocky-9 # optional: default is ubuntu-24.04
49
+ # autoscaling_image: 103908130 # optional, defaults to the `image` setting
50
+ # snapshot_os: microos # optional: specified the os type when using a custom snapshot
51
+
52
+ masters_pool:
53
+ instance_type: cpx21
54
+ instance_count: 1 # for HA; you can also create a single master cluster for dev and testing (not recommended for production)
55
+ locations: # You can choose a single location for single master clusters or if you prefer to have all masters in the same location. For regional clusters (which are only available in the eu-central network zone), each master needs to be placed in a separate location.
56
+ # - fsn1
57
+ # - hel1
58
+ - nbg1
59
+
60
+ worker_node_pools:
61
+ - name: small-static
62
+ instance_type: cx32
63
+ instance_count: 2
64
+ location: nbg1
65
+ # image: debian-11
66
+ # labels:
67
+ # - key: purpose
68
+ # value: blah
69
+ # taints:
70
+ # - key: something
71
+ # value: value1:NoSchedule
72
+ # - name: medium-autoscaled
73
+ # instance_type: cpx31
74
+ # location: fsn1
75
+ # autoscaling:
76
+ # enabled: true
77
+ # min_instances: 0
78
+ # max_instances: 3
79
+
80
+ embedded_registry_mirror:
81
+ enabled: false # Enables fast p2p distribution of container images between nodes for faster pod startup. Check if your k3s version is compatible before enabling this option. You can find more information at https://docs.k3s.io/installation/registry-mirror
82
+
83
+ protect_against_deletion: true
84
+
85
+ create_load_balancer_for_the_kubernetes_api: false # Just a heads up: right now, we can’t limit access to the load balancer by IP through the firewall. This feature hasn’t been added by Hetzner yet.
86
+
87
+ # additional_packages:
88
+ # - somepackage
89
+
90
+ # post_create_commands:
91
+ # - apt update
92
+ # - apt upgrade -y
93
+ # - apt autoremove -y
94
+
95
+ # kube_api_server_args:
96
+ # - arg1
97
+ # - ...
98
+ # kube_scheduler_args:
99
+ # - arg1
100
+ # - ...
101
+ # kube_controller_manager_args:
102
+ # - arg1
103
+ # - ...
104
+ # kube_cloud_controller_manager_args:
105
+ # - arg1
106
+ # - ...
107
+ # kubelet_args:
108
+ # - arg1
109
+ # - ...
110
+ # kube_proxy_args:
111
+ # - arg1
112
+ # - ...
113
+ # api_server_hostname: k8s.example.com # optional: DNS for the k8s API LoadBalancer. After the script has run, create a DNS record with the address of the API LoadBalancer.
@@ -0,0 +1,49 @@
1
+ # INSTALLATION
2
+ # 1. Install Helm: https://helm.sh/docs/intro/install/
3
+ # 2. Add ingress-nginx Helm repo: helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
4
+ # 3. Update information of available charts: helm repo update
5
+ # 4. Install ingress-nginx:
6
+ # helm upgrade --install \
7
+ # ingress-nginx ingress-nginx/ingress-nginx \
8
+ # --set controller.ingressClassResource.default=true \ # Remove this line if you don’t want Nginx to be the default Ingress Controller
9
+ # -f ./ingress-nginx-annotations.yaml \
10
+ # --namespace ingress-nginx \
11
+ # --create-namespace
12
+
13
+ # LIST of all ANNOTATIONS: https://github.com/hetznercloud/hcloud-cloud-controller-manager/blob/master/internal/annotation/load_balancer.go
14
+
15
+ controller:
16
+ kind: DaemonSet
17
+ service:
18
+ annotations:
19
+ # Germany:
20
+ # - nbg1 (Nuremberg)
21
+ # - fsn1 (Falkenstein)
22
+ # Finland:
23
+ # - hel1 (Helsinki)
24
+ # USA:
25
+ # - ash (Ashburn, Virginia)
26
+ # Without this, the load balancer won’t be provisioned and will stay in "pending" state.
27
+ # You can check this state using "kubectl get svc -n ingress-nginx"
28
+ load-balancer.hetzner.cloud/location: nbg1
29
+
30
+ # Name of the load balancer. This name will appear in your Hetzner cloud console under "Your project -> Load Balancers".
31
+ # NOTE: This is NOT the load balancer created automatically for HA clusters. You need to specify a different name here to create a separate load balancer for ingress Nginx.
32
+ load-balancer.hetzner.cloud/name: ingress-lb
33
+
34
+ # Ensures communication between the load balancer and cluster nodes happens through the private network.
35
+ load-balancer.hetzner.cloud/use-private-ip: "true"
36
+
37
+ # [ START: Use these annotations if you care about seeing the actual client IP ]
38
+ # "uses-proxyprotocol" enables the proxy protocol on the load balancer so that the ingress controller and applications can see the real client IP.
39
+ # "hostname" is needed if you use cert-manager (LetsEncrypt SSL certificates). It fixes HTTP01 challenges for cert-manager (https://cert-manager.io/docs/).
40
+ # Check this link for more details: https://github.com/compumike/hairpin-proxy
41
+ # In short: the easiest fix provided by some providers (including Hetzner) is to configure the load balancer to use a hostname instead of an IP.
42
+ load-balancer.hetzner.cloud/uses-proxyprotocol: 'true'
43
+
44
+ # 1. "yourDomain.com" must be correctly configured in DNS to point to the Nginx load balancer; otherwise, certificate provisioning won’t work.
45
+ # 2. If you use multiple domains, specify any one.
46
+ # load-balancer.hetzner.cloud/hostname: yourDomain.com
47
+ # [ END: Use these annotations if you care about seeing the actual client IP ]
48
+
49
+ load-balancer.hetzner.cloud/http-redirect-https: 'false'
@@ -0,0 +1,8 @@
1
+ apiVersion: v1
2
+ kind: ConfigMap
3
+ metadata:
4
+ # Do not change the name - this is required by the Nginx Ingress Controller
5
+ name: ingress-nginx-controller
6
+ namespace: ingress-nginx
7
+ data:
8
+ use-proxy-protocol: "true"
@@ -0,0 +1,8 @@
1
+ apiVersion: storage.k8s.io/v1
2
+ kind: StorageClass
3
+ metadata:
4
+ name: hcloud-volumes-retain
5
+ provisioner: csi.hetzner.cloud
6
+ reclaimPolicy: Retain
7
+ volumeBindingMode: WaitForFirstConsumer
8
+ allowVolumeExpansion: true
@@ -0,0 +1,62 @@
1
+ apiVersion: networking.k8s.io/v1
2
+ kind: Ingress
3
+ metadata:
4
+ name: grafana
5
+ namespace: monitoring
6
+ labels:
7
+ app: grafana
8
+ spec:
9
+ ingressClassName: nginx
10
+ rules:
11
+ - host: grafana.$APEX_DOMAIN
12
+ http:
13
+ paths:
14
+ - path: /
15
+ pathType: Prefix
16
+ backend:
17
+ service:
18
+ name: prometheus-grafana
19
+ port:
20
+ number: 80
21
+ ---
22
+ apiVersion: networking.k8s.io/v1
23
+ kind: Ingress
24
+ metadata:
25
+ name: prometheus
26
+ namespace: monitoring
27
+ labels:
28
+ app: prometheus
29
+ spec:
30
+ ingressClassName: nginx
31
+ rules:
32
+ - host: prometheus.$APEX_DOMAIN
33
+ http:
34
+ paths:
35
+ - path: /
36
+ pathType: Prefix
37
+ backend:
38
+ service:
39
+ name: prometheus-kube-prometheus-prometheus
40
+ port:
41
+ number: 9090
42
+ ---
43
+ apiVersion: networking.k8s.io/v1
44
+ kind: Ingress
45
+ metadata:
46
+ name: alerts
47
+ namespace: monitoring
48
+ labels:
49
+ app: alerts
50
+ spec:
51
+ ingressClassName: nginx
52
+ rules:
53
+ - host: alerts.$APEX_DOMAIN
54
+ http:
55
+ paths:
56
+ - path: /
57
+ pathType: Prefix
58
+ backend:
59
+ service:
60
+ name: prometheus-kube-prometheus-alertmanager
61
+ port:
62
+ number: 9093
@@ -0,0 +1,35 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: stackgres-ui-workaround-svc
5
+ labels:
6
+ app: stackgres
7
+ namespace: stackgres
8
+ spec:
9
+ selector:
10
+ stackgres.io/restapi: "true"
11
+ ports:
12
+ - protocol: TCP
13
+ port: 80
14
+ targetPort: 9080
15
+ ---
16
+ apiVersion: networking.k8s.io/v1
17
+ kind: Ingress
18
+ metadata:
19
+ name: stackgres-ui
20
+ namespace: stackgres
21
+ labels:
22
+ app: stackgres
23
+ spec:
24
+ ingressClassName: nginx
25
+ rules:
26
+ - host: db.$APEX_DOMAIN
27
+ http:
28
+ paths:
29
+ - path: /
30
+ pathType: Prefix
31
+ backend:
32
+ service:
33
+ name: stackgres-ui-workaround-svc
34
+ port:
35
+ number: 80
@@ -0,0 +1,60 @@
1
+ apiVersion: v1
2
+ kind: Namespace
3
+ metadata:
4
+ name: tmp
5
+ ---
6
+ apiVersion: v1
7
+ kind: Service
8
+ metadata:
9
+ name: hello-kubernetes-first
10
+ namespace: tmp
11
+ spec:
12
+ type: ClusterIP
13
+ ports:
14
+ - port: 80
15
+ targetPort: 8080
16
+ selector:
17
+ app: hello-kubernetes-first
18
+ ---
19
+ apiVersion: apps/v1
20
+ kind: Deployment
21
+ metadata:
22
+ name: hello-kubernetes-first
23
+ namespace: tmp
24
+ spec:
25
+ replicas: 3
26
+ selector:
27
+ matchLabels:
28
+ app: hello-kubernetes-first
29
+ template:
30
+ metadata:
31
+ labels:
32
+ app: hello-kubernetes-first
33
+ spec:
34
+ containers:
35
+ - name: hello-kubernetes
36
+ image: paulbouwer/hello-kubernetes:1.10
37
+ ports:
38
+ - containerPort: 8080
39
+ env:
40
+ - name: MESSAGE
41
+ value: Hello from the first deployment!
42
+ ---
43
+ apiVersion: networking.k8s.io/v1
44
+ kind: Ingress
45
+ metadata:
46
+ name: hello-kubernetes-ingress
47
+ namespace: tmp
48
+ spec:
49
+ ingressClassName: "nginx"
50
+ rules:
51
+ - host: $TEST_HOST
52
+ http:
53
+ paths:
54
+ - pathType: Prefix
55
+ path: "/"
56
+ backend:
57
+ service:
58
+ name: hello-kubernetes-first
59
+ port:
60
+ number: 80
@@ -0,0 +1,21 @@
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
20
+ prefect:
21
+ - prefect.yaml.hb
@@ -0,0 +1,55 @@
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
+ restartPolicy: Never
52
+ {{#unless @last}}
53
+ ---
54
+ {{/unless}}
55
+ {{/each}}
@@ -0,0 +1,42 @@
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
+ restartPolicy: Never
41
+ backoffLimit: 0
42
+ ttlSecondsAfterFinished: 3600
@@ -0,0 +1,44 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ labels:
5
+ app: {{debug_pod_name}}
6
+ env: {{monorepo_env}}
7
+ name: {{debug_pod_name}}
8
+ namespace: {{namespace}}
9
+ spec:
10
+ selector:
11
+ matchLabels:
12
+ app: {{debug_pod_name}}
13
+ template:
14
+ metadata:
15
+ labels:
16
+ app: {{debug_pod_name}}
17
+ env: {{monorepo_env}}
18
+ spec:
19
+ volumes:
20
+ - name: secret-injection-hook
21
+ secret:
22
+ secretName: {{env_secret_name}}
23
+ containers:
24
+ - image: {{image_path}}
25
+ name: {{debug_pod_name}}
26
+ env:
27
+ - name: MONOREPO_ENV
28
+ value: {{monorepo_env}}
29
+ - name: MONOREPO_NAMESPACE
30
+ value: {{namespace}}
31
+ - name: IS_KUBERNETES
32
+ value: 'true'
33
+ - name: MONOREPO_BASE_SECRET
34
+ valueFrom:
35
+ secretKeyRef:
36
+ name: {{env_secret_name}}
37
+ key: {{env_base_secret_key}}
38
+ volumeMounts:
39
+ - name: secret-injection-hook
40
+ mountPath: /etc/kubernetes/secrets
41
+ readOnly: true
42
+ resources:
43
+ requests:
44
+ memory: 250Mi
@@ -0,0 +1,47 @@
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