-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create CronJob to run stats-pipeline on GKE (#52)
* Add CronJob to run the maptiles-runner * Fix cloudbuild.yaml * Rename runner.yaml * Update cloudbuild.yaml * Move concurrencyPolicy * Fix env variables * update deployment * Move concurrencyPolicy to the right place. * Set schedule from ENV variable. * Add restartPolicy: Never * Rename maptiles to stats-pipeline-runner * Rename -runner to -cronjob * Fix yaml name * Update run-pipeline * Remove extra \ * Rename _TAG to _DOCKER_TAG * Rename PIPELINE_SCHEDULE to PIPELINE_CRON_SCHEDULE * Rename to .template * Add comments * Added comment
- Loading branch information
1 parent
4362b42
commit 4bafa31
Showing
4 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
k8s/data-processing/jobs/stats-pipeline-cronjob.yaml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# cronjob.yaml | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: stats-pipeline-cronjob | ||
spec: | ||
schedule: "{{PIPELINE_CRON_SCHEDULE}}" | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: maptiles-runner | ||
# The exact image to be deployed is replaced by gke-deploy, this is | ||
# a placeholder | ||
image: gcr.io/{{GCLOUD_PROJECT}}/stats-pipeline-runner | ||
args: | ||
- /bin/bash | ||
- run-pipeline.sh | ||
env: | ||
- name: PROJECT | ||
value: {{GCLOUD_PROJECT}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters