-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
3 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
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,3 @@ | ||
apiVersion: v2 | ||
name: metaforecast | ||
version: "0.1.0" |
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,27 @@ | ||
{{- range $jobname, $job := .Values.jobs }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ $.Release.Name }}-{{ $jobname }} | ||
spec: | ||
concurrencyPolicy: Forbid | ||
schedule: {{ $job.schedule | required "schedule is required" }} | ||
timeZone: Etc/UTC | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
imagePullSecrets: | ||
- name: {{ required "image.pullSecret is required" $.Values.image.pullSecret }} | ||
containers: | ||
- name: cronjob | ||
image: "{{ required "image.name is required" $.Values.image.name }}:{{ required "image.tag is required" $.Values.image.tag }}" | ||
imagePullPolicy: Always | ||
envFrom: | ||
- secretRef: | ||
name: {{ $.Values.envSecret }} | ||
command: | ||
{{- $job.command | required "command is required" | toYaml | nindent 12 }} | ||
{{- end }} |
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,18 @@ | ||
# To deploy Metaforecast as a Kubernetes chart, you need to provide a valid image. | ||
# QURI doesn't have a public container registry, so you'll have to build the image yourself (from the `ops/Dockerfile` in this repo). | ||
# At QURI, we use a private container registry, and do builds with Argo Workflows. | ||
image: | ||
pullSecret: '' # name of kubernetes secret that provides access to the private container registry | ||
name: '' # full name of the image - override this | ||
tag: '' # tag of the image - override this | ||
|
||
# Secret; you should create this in your k8s cluster. | ||
envSecret: metaforecast-env | ||
|
||
jobs: | ||
scheduler: | ||
command: ['ts-node', '-T', 'src/backend/flow/doEverythingForScheduler.ts'] | ||
schedule: '0 3 * * *' # every day at 3am | ||
frontpage: | ||
command: ['ts-node', '-T', 'src/backend/index.ts', 'frontpage'] | ||
schedule: '0 6 * * *' # every day at 6am |