Skip to content

Instantly share code, notes, and snippets.

@chanwit
Created November 20, 2023 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chanwit/baef8b45889618e46df87064809da52f to your computer and use it in GitHub Desktop.
Save chanwit/baef8b45889618e46df87064809da52f to your computer and use it in GitHub Desktop.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: flux-sync
spec:
schedule: "0 0 * * *" # This is a cron expression for once a day at midnight
jobTemplate:
spec:
template:
spec:
containers:
- name: flux
image: fluxcd/flux-cli:v2.1.2 # Use the appropriate Flux CLI image
args:
- reconcile
- source
- git
- your-git-repo-name
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment