Skip to content

Instantly share code, notes, and snippets.

@dontlaugh
Last active August 27, 2020 17:18
Show Gist options
  • Save dontlaugh/e2dcc4c933d9d69678e7c795434546eb to your computer and use it in GitHub Desktop.
Save dontlaugh/e2dcc4c933d9d69678e7c795434546eb to your computer and use it in GitHub Desktop.
Data auditing cron job (update-checker)
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: update-checker
namespace: apis
annotations:
fluxcd.io/automated: "true"
fluxcd.io/tag.update-checker: glob:sha-*
spec:
# Every 6 hours
schedule: "0 */6 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: update-checker
image: novelcovid/novelcovid-api:sha-cd9021e
command:
- npm
- run
- updateCheck
imagePullPolicy: Always
env:
- name: WEBHOOK_TOKEN
valueFrom:
secretKeyRef:
name: discord-token
key: WEBHOOK_TOKEN
restartPolicy: Never
imagePullSecrets:
- name: docker.greymatter.io
@dontlaugh
Copy link
Author

dontlaugh commented Aug 27, 2020

What is the env var the job expects? Can we put this job into an NPM run script?

@dontlaugh
Copy link
Author

We can change the schedule if need be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment