Skip to content

Commit

Permalink
chore: enable cronjobs only on prod-(near) environments
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed May 4, 2024
1 parent fb50b1a commit 7c3c811
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 3 deletions.
7 changes: 6 additions & 1 deletion project.garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ environments:
variables:
# hostname: local.democracy-app.de
hostname: local.app.garden
- name: local-prod
defaultNamespace: ${var.userNamespace}
variables:
# hostname: local.democracy-app.de
hostname: local.app.garden

providers:
- name: local-kubernetes
environments: [local]
environments: [local, local-prod]
2 changes: 2 additions & 0 deletions services/cron-jobs/cleanup-push-queue/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.cleanup-push-queue, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
6 changes: 4 additions & 2 deletions services/cron-jobs/crawler/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-procedures, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

varfiles:
- .env
- .env.local
Expand All @@ -29,9 +31,9 @@ variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

spec:
files: [./manifests/*] # <--- Tell Garden what manifests to use
files:
- ./manifests/*

# Patch the K8s manifests for the api service so that we can set the correct image
patchResources:
- name: import-procedures
kind: CronJob
Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/import-conference-week-details/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-conference-week-details, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/import-deputy-profiles/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-deputy-profiles, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/import-named-poll-deputies/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-named-poll-deputies, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/import-named-polls/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-named-polls, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/import-plenary-minutes/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.import-plenary-minutes, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/index-sync-bundestagio/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.index-sync-bundestagio, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/bundestagio

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/index-sync-democracy/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.index-sync-democracy, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/push-send-queued/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.push-send-queued, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

varfiles:
- .env

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/queue-pushs-conference-week/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.queue-pushs-conference-week, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.queue-pushs-vote-conference-week, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/queue-pushs-vote-top-100/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.queue-pushs-vote-top-100, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/shedule-bio-resync/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.shedule-bio-resync, deploy.mongo]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy

Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/sync-deputy-profiles/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.sync-deputy-profiles, deploy.mongo, deploy.bundestag-io-api]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy
BUNDESTAGIO_SERVER_URL: http://bundestag-io-api
Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/sync-named-polls/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.sync-named-polls, deploy.mongo, deploy.bundestag-io-api]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy
BUNDESTAGIO_SERVER_URL: http://bundestag-io-api
Expand Down
2 changes: 2 additions & 0 deletions services/cron-jobs/sync-procedures/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type: kubernetes
description: Deploy the importer of procedures for the bundestag.io API
dependencies: [build.sync-procedures, deploy.mongo, deploy.bundestag-io-api]

disabled: ${!(environment.name == "prod" || environment.name == "local-prod")}

variables:
DB_URL: mongodb://democracy-mongo:27017/democracy
BUNDESTAGIO_SERVER_URL: http://bundestag-io-api
Expand Down

0 comments on commit 7c3c811

Please sign in to comment.