@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.
- package/dist/chunk-N7EX3HJH.js +139 -0
- package/dist/chunk-RZ46YYZZ.js +420 -0
- package/dist/chunk-WKP7EQNU.js +421 -0
- package/dist/devops.d.ts +0 -2
- package/dist/devops.js +3235 -91
- package/dist/index.d.ts +972 -4
- package/dist/index.js +67 -3
- package/dist/plugins.d.ts +95 -4
- package/dist/plugins.js +20 -6
- package/dist/src/target-templates/README.md +1 -0
- package/dist/src/target-templates/cluster-resource-options/README.md +2 -0
- package/dist/src/target-templates/cluster-resource-options/dns-test/dns-test.yaml +60 -0
- package/dist/src/target-templates/cluster-resource-options/milvus/production/milvus-values.yaml +2 -0
- package/dist/src/target-templates/cluster-resource-options/milvus/staging/milvus-values.yaml +2 -0
- package/dist/src/target-templates/cluster-resource-options/monitoring-ingress/monitoring-ingress.yaml +62 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/daily-operator-restart.yaml +54 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/PodDisruptionBudget.yaml +27 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/SGCluster.yaml +47 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/StackGres-alerts.yaml +191 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/06-SGDistributedLogs.yaml +11 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/07-SGObjectStorage.yaml +18 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/08-SGScript.yaml +12 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/stackgres-ui-ingress.yaml +35 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/staging/cluster/SGCluster.yaml +42 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/07-SGObjectStorage.yaml +18 -0
- package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/08-SGScript.yaml +12 -0
- package/dist/src/target-templates/cluster-resource-options/prefect/production/prefect-values.yaml +14 -0
- package/dist/src/target-templates/cluster-resource-options/prefect/staging/prefect-values.yaml +14 -0
- package/dist/src/target-templates/cluster-resource-options/redis/production/redis-values.yaml +20 -0
- package/dist/src/target-templates/cluster-resource-options/redis/staging/redis-values.yaml +8 -0
- package/dist/src/target-templates/infra-variants/README.md +2 -0
- package/dist/src/target-templates/infra-variants/digitalocean/.devops/config/constants.yaml +18 -0
- package/dist/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml +91 -0
- package/dist/src/target-templates/infra-variants/gcloud/.devops/config/constants.yaml +15 -0
- package/dist/src/target-templates/infra-variants/gcloud/.devops/manifests/ingress.yaml.hb +22 -0
- package/dist/src/target-templates/infra-variants/gcloud/.github/workflows/k8s-build.yaml +95 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/config/constants.yaml +18 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/harbor-values.yaml +30 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/hcloud-config.yaml +134 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/cert-manager.yaml +25 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-cert.yaml +13 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-values.yaml +76 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/hcloud-config.yaml +113 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-annotations.yaml +49 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-configmap.yaml +8 -0
- package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/retain-storage-class.yaml +8 -0
- package/dist/src/target-templates/infra-variants/hetzner/.github/workflows/k8s-build.yaml +93 -0
- package/dist/src/target-templates/lang-variants-common/README.md +4 -0
- package/dist/src/target-templates/lang-variants-common/python/.cursor/rules/monorepo-python.mdc +56 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/config/images.yaml +89 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-exec.sh +8 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-run.sh +8 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services.Dockerfile +29 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/_index.yaml +21 -0
- package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/prefect.yaml.hb +63 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/pyproject.toml +14 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/src/example_data_pipeline/main.py +38 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-python/pyproject.toml +20 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/__init__.py +0 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/main.py +13 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/scripts.py +17 -0
- package/dist/src/target-templates/lang-variants-common/python/applications/example-python/tests/__init__.py +0 -0
- package/dist/src/target-templates/lang-variants-common/python/devopspy +3 -0
- package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/pyproject.toml +11 -0
- package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/src/example_python_lib/__init__.py +2 -0
- package/dist/src/target-templates/lang-variants-common/python/pyproject.toml +16 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.cursor/rules/monorepo-typescript.mdc +51 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/config/images.yaml +69 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/cloudrun.Dockerfile +31 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/common/docker-common.sh +23 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-exec.sh +8 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-run.sh +8 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services.Dockerfile +31 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/env.example.yaml +23 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/_index.yaml +19 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/cron-jobs.yaml.hb +56 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/db-migrate-job.yaml.hb +43 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-debug.yaml.hb +42 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-process.yaml.hb +48 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-web.yaml.hb +54 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/ingress.yaml.hb +21 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/service.yaml.hb +15 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.envrc +5 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/build-image@v1/action.yaml +81 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-digital-ocean@v1/action.yaml +29 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-gke@v1/action.yaml +43 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-hetzner@v1/action.yaml +31 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/db-migrate@v1/action.yaml +23 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-cloudrun@v1/action.yaml +71 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-k8s@v1/action.yaml +37 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/setup-prereq@v1/action.yaml +24 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/index.ts +30 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/package.json +26 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/tsconfig.json +3 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/README.md +68 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/index.ts +1 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/package.json +30 -0
- package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/tsconfig.json +3 -0
- package/dist/src/target-templates/lang-variants-common/typescript/config/.env.development +1 -0
- package/dist/src/target-templates/lang-variants-common/typescript/config/.env.global +4 -0
- package/dist/src/target-templates/lang-variants-common/typescript/config/.env.test +1 -0
- package/dist/src/target-templates/lang-variants-common/typescript/devops +3 -0
- package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/index.ts +3 -0
- package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/package.json +12 -0
- package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/tsconfig.json +3 -0
- package/dist/src/target-templates/lang-variants-common/typescript/tmp/.gitkeep +0 -0
- package/dist/src/target-templates/lang-variants-common/typescript/tsconfig.json +27 -0
- package/dist/src/target-templates/lang-variants-prisma/README.md +3 -0
- package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/prisma-python.mdc +55 -0
- package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/testing-python.mdc +89 -0
- package/dist/src/target-templates/lang-variants-prisma/python/db/db/__init__.py +0 -0
- package/dist/src/target-templates/lang-variants-prisma/python/db/db/db_client_test.py +46 -0
- package/dist/src/target-templates/lang-variants-prisma/python/db/pyproject.toml +14 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/prisma-typescript.mdc +54 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/testing-typescript.mdc +103 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client-test.ts +142 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client.ts +19 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/env.yaml +4 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/package.json +17 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma/schema.prisma +24 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma-setup-vitest.ts +27 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/db/tsconfig.json +3 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/dml/package.json +7 -0
- package/dist/src/target-templates/lang-variants-prisma/typescript/dml/tsconfig.json +3 -0
- package/package.json +3 -2
- package/src/cli/core/exec.ts +2 -4
- package/src/cli/core/run.ts +2 -4
- package/src/cli/extensions/prisma.ts +2 -4
- package/src/libs/init-generator.ts +2 -4
- package/src/pkg-root.ts +14 -0
- package/src/plugins.ts +2 -4
- package/dist/app-support/crypto/aes.d.ts +0 -15
- package/dist/app-support/crypto/aes.d.ts.map +0 -1
- package/dist/app-support/crypto/aes.js +0 -56
- package/dist/app-support/crypto/aes.spec.d.ts +0 -2
- package/dist/app-support/crypto/aes.spec.d.ts.map +0 -1
- package/dist/app-support/crypto/aes.spec.js +0 -58
- package/dist/app-support/crypto/index.d.ts +0 -16
- package/dist/app-support/crypto/index.d.ts.map +0 -1
- package/dist/app-support/crypto/index.js +0 -31
- package/dist/app-support/crypto/internal-token.d.ts +0 -20
- package/dist/app-support/crypto/internal-token.d.ts.map +0 -1
- package/dist/app-support/crypto/internal-token.js +0 -42
- package/dist/app-support/crypto/internal-token.spec.d.ts +0 -2
- package/dist/app-support/crypto/internal-token.spec.d.ts.map +0 -1
- package/dist/app-support/crypto/internal-token.spec.js +0 -45
- package/dist/app-support/crypto/secret.d.ts +0 -3
- package/dist/app-support/crypto/secret.d.ts.map +0 -1
- package/dist/app-support/crypto/secret.js +0 -12
- package/dist/app-support/crypto/secret.spec.d.ts +0 -2
- package/dist/app-support/crypto/secret.spec.d.ts.map +0 -1
- package/dist/app-support/crypto/secret.spec.js +0 -15
- package/dist/app-support/discovery/dev-discovery-loader.d.ts +0 -2
- package/dist/app-support/discovery/dev-discovery-loader.d.ts.map +0 -1
- package/dist/app-support/discovery/dev-discovery-loader.js +0 -30
- package/dist/app-support/discovery/service-endpoint.d.ts +0 -2
- package/dist/app-support/discovery/service-endpoint.d.ts.map +0 -1
- package/dist/app-support/discovery/service-endpoint.js +0 -10
- package/dist/cli/common.d.ts +0 -89
- package/dist/cli/common.d.ts.map +0 -1
- package/dist/cli/common.js +0 -246
- package/dist/cli/common.spec.d.ts +0 -2
- package/dist/cli/common.spec.d.ts.map +0 -1
- package/dist/cli/common.spec.js +0 -64
- package/dist/cli/core/affected.d.ts +0 -9
- package/dist/cli/core/affected.d.ts.map +0 -1
- package/dist/cli/core/affected.js +0 -101
- package/dist/cli/core/cloudrun.d.ts +0 -9
- package/dist/cli/core/cloudrun.d.ts.map +0 -1
- package/dist/cli/core/cloudrun.js +0 -119
- package/dist/cli/core/console.d.ts +0 -10
- package/dist/cli/core/console.d.ts.map +0 -1
- package/dist/cli/core/console.js +0 -50
- package/dist/cli/core/constant.d.ts +0 -9
- package/dist/cli/core/constant.d.ts.map +0 -1
- package/dist/cli/core/constant.js +0 -20
- package/dist/cli/core/env.d.ts +0 -9
- package/dist/cli/core/env.d.ts.map +0 -1
- package/dist/cli/core/env.js +0 -65
- package/dist/cli/core/exec.d.ts +0 -9
- package/dist/cli/core/exec.d.ts.map +0 -1
- package/dist/cli/core/exec.js +0 -48
- package/dist/cli/core/image.d.ts +0 -9
- package/dist/cli/core/image.d.ts.map +0 -1
- package/dist/cli/core/image.js +0 -153
- package/dist/cli/core/index.d.ts +0 -16
- package/dist/cli/core/index.d.ts.map +0 -1
- package/dist/cli/core/index.js +0 -15
- package/dist/cli/core/init.d.ts +0 -9
- package/dist/cli/core/init.d.ts.map +0 -1
- package/dist/cli/core/init.js +0 -219
- package/dist/cli/core/job.d.ts +0 -9
- package/dist/cli/core/job.d.ts.map +0 -1
- package/dist/cli/core/job.js +0 -65
- package/dist/cli/core/namespace.d.ts +0 -9
- package/dist/cli/core/namespace.d.ts.map +0 -1
- package/dist/cli/core/namespace.js +0 -67
- package/dist/cli/core/prep-build.d.ts +0 -10
- package/dist/cli/core/prep-build.d.ts.map +0 -1
- package/dist/cli/core/prep-build.js +0 -109
- package/dist/cli/core/registry.d.ts +0 -9
- package/dist/cli/core/registry.d.ts.map +0 -1
- package/dist/cli/core/registry.js +0 -66
- package/dist/cli/core/run-many.d.ts +0 -10
- package/dist/cli/core/run-many.d.ts.map +0 -1
- package/dist/cli/core/run-many.js +0 -48
- package/dist/cli/core/run.d.ts +0 -9
- package/dist/cli/core/run.d.ts.map +0 -1
- package/dist/cli/core/run.js +0 -35
- package/dist/cli/core/test.d.ts +0 -9
- package/dist/cli/core/test.d.ts.map +0 -1
- package/dist/cli/core/test.js +0 -26
- package/dist/cli/extensions/dml.d.ts +0 -9
- package/dist/cli/extensions/dml.d.ts.map +0 -1
- package/dist/cli/extensions/dml.js +0 -114
- package/dist/cli/extensions/index.d.ts +0 -9
- package/dist/cli/extensions/index.d.ts.map +0 -1
- package/dist/cli/extensions/index.js +0 -8
- package/dist/cli/extensions/internal-curl.d.ts +0 -10
- package/dist/cli/extensions/internal-curl.d.ts.map +0 -1
- package/dist/cli/extensions/internal-curl.js +0 -41
- package/dist/cli/extensions/jwt.d.ts +0 -9
- package/dist/cli/extensions/jwt.d.ts.map +0 -1
- package/dist/cli/extensions/jwt.js +0 -25
- package/dist/cli/extensions/prisma.d.ts +0 -9
- package/dist/cli/extensions/prisma.d.ts.map +0 -1
- package/dist/cli/extensions/prisma.js +0 -23
- package/dist/cli/extensions/redis-bitnami.d.ts +0 -11
- package/dist/cli/extensions/redis-bitnami.d.ts.map +0 -1
- package/dist/cli/extensions/redis-bitnami.js +0 -74
- package/dist/cli/extensions/redis-ha.d.ts +0 -11
- package/dist/cli/extensions/redis-ha.d.ts.map +0 -1
- package/dist/cli/extensions/redis-ha.js +0 -51
- package/dist/cli/extensions/stackgres.d.ts +0 -10
- package/dist/cli/extensions/stackgres.d.ts.map +0 -1
- package/dist/cli/extensions/stackgres.js +0 -117
- package/dist/cli/extensions/template.d.ts +0 -9
- package/dist/cli/extensions/template.d.ts.map +0 -1
- package/dist/cli/extensions/template.js +0 -121
- package/dist/devops.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/libs/affected-entities.d.ts +0 -15
- package/dist/libs/affected-entities.d.ts.map +0 -1
- package/dist/libs/affected-entities.js +0 -52
- package/dist/libs/cloudrun-helpers.d.ts +0 -16
- package/dist/libs/cloudrun-helpers.d.ts.map +0 -1
- package/dist/libs/cloudrun-helpers.js +0 -81
- package/dist/libs/config.d.ts +0 -7
- package/dist/libs/config.d.ts.map +0 -1
- package/dist/libs/config.js +0 -102
- package/dist/libs/digital-ocean/container-reg.d.ts +0 -6
- package/dist/libs/digital-ocean/container-reg.d.ts.map +0 -1
- package/dist/libs/digital-ocean/container-reg.js +0 -74
- package/dist/libs/discovery/dependencies.d.ts +0 -19
- package/dist/libs/discovery/dependencies.d.ts.map +0 -1
- package/dist/libs/discovery/dependencies.js +0 -62
- package/dist/libs/discovery/dependencies.spec.d.ts +0 -2
- package/dist/libs/discovery/dependencies.spec.d.ts.map +0 -1
- package/dist/libs/discovery/dependencies.spec.js +0 -21
- package/dist/libs/discovery/images.d.ts +0 -5
- package/dist/libs/discovery/images.d.ts.map +0 -1
- package/dist/libs/discovery/images.js +0 -45
- package/dist/libs/discovery/index.d.ts +0 -6
- package/dist/libs/discovery/index.d.ts.map +0 -1
- package/dist/libs/discovery/index.js +0 -67
- package/dist/libs/discovery/process-common.d.ts +0 -25
- package/dist/libs/discovery/process-common.d.ts.map +0 -1
- package/dist/libs/discovery/process-common.js +0 -40
- package/dist/libs/discovery/process-package-json.d.ts +0 -3
- package/dist/libs/discovery/process-package-json.d.ts.map +0 -1
- package/dist/libs/discovery/process-package-json.js +0 -40
- package/dist/libs/discovery/process-pyproject-toml.d.ts +0 -3
- package/dist/libs/discovery/process-pyproject-toml.d.ts.map +0 -1
- package/dist/libs/discovery/process-pyproject-toml.js +0 -49
- package/dist/libs/git-helpers.d.ts +0 -8
- package/dist/libs/git-helpers.d.ts.map +0 -1
- package/dist/libs/git-helpers.js +0 -20
- package/dist/libs/hetzner/reg-secret.d.ts +0 -3
- package/dist/libs/hetzner/reg-secret.d.ts.map +0 -1
- package/dist/libs/hetzner/reg-secret.js +0 -39
- package/dist/libs/init-generator.d.ts +0 -41
- package/dist/libs/init-generator.d.ts.map +0 -1
- package/dist/libs/init-generator.js +0 -123
- package/dist/libs/k8s-constants.d.ts +0 -13
- package/dist/libs/k8s-constants.d.ts.map +0 -1
- package/dist/libs/k8s-constants.js +0 -91
- package/dist/libs/k8s-db.d.ts +0 -18
- package/dist/libs/k8s-db.d.ts.map +0 -1
- package/dist/libs/k8s-db.js +0 -73
- package/dist/libs/k8s-generate.d.ts +0 -17
- package/dist/libs/k8s-generate.d.ts.map +0 -1
- package/dist/libs/k8s-generate.js +0 -193
- package/dist/libs/k8s-helpers.d.ts +0 -11
- package/dist/libs/k8s-helpers.d.ts.map +0 -1
- package/dist/libs/k8s-helpers.js +0 -42
- package/dist/libs/k8s-image-config.d.ts +0 -8
- package/dist/libs/k8s-image-config.d.ts.map +0 -1
- package/dist/libs/k8s-image-config.js +0 -113
- package/dist/libs/k8s-job-waiter.d.ts +0 -8
- package/dist/libs/k8s-job-waiter.d.ts.map +0 -1
- package/dist/libs/k8s-job-waiter.js +0 -84
- package/dist/libs/k8s-namespace.d.ts +0 -7
- package/dist/libs/k8s-namespace.d.ts.map +0 -1
- package/dist/libs/k8s-namespace.js +0 -27
- package/dist/libs/k8s-redis-bitnami.d.ts +0 -6
- package/dist/libs/k8s-redis-bitnami.d.ts.map +0 -1
- package/dist/libs/k8s-redis-bitnami.js +0 -31
- package/dist/libs/k8s-redis-ha.d.ts +0 -3
- package/dist/libs/k8s-redis-ha.d.ts.map +0 -1
- package/dist/libs/k8s-redis-ha.js +0 -15
- package/dist/libs/k8s-secrets-manager.d.ts +0 -6
- package/dist/libs/k8s-secrets-manager.d.ts.map +0 -1
- package/dist/libs/k8s-secrets-manager.js +0 -64
- package/dist/libs/validate-env.d.ts +0 -56
- package/dist/libs/validate-env.d.ts.map +0 -1
- package/dist/libs/validate-env.js +0 -214
- package/dist/libs/validate-env.spec.d.ts +0 -2
- package/dist/libs/validate-env.spec.d.ts.map +0 -1
- package/dist/libs/validate-env.spec.js +0 -168
- package/dist/plugins.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -939
- package/dist/types/index.d.ts.map +0 -1
- 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
|
|
File without changes
|
|
@@ -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)
|
|
File without changes
|
|
@@ -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,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
|
+
#
|
package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/_index.yaml
ADDED
|
@@ -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
|