# infrastructure/longhorn/core/cassandra-recurring-jobs.yaml
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
  name: cassandra-postgres-backup
  namespace: longhorn-system
spec:
  name: cassandra-postgres-backup
  cron: "30 5 * * *"
  task: backup
  groups:
    - cassandra
    - cassandra-postgres
  retain: 7
  concurrency: 1
---
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
  name: cassandra-postgres-snapshot
  namespace: longhorn-system
spec:
  name: cassandra-postgres-snapshot
  cron: "*/30 * * * *"
  task: snapshot
  groups:
    - cassandra
    - cassandra-postgres
  retain: 8
  concurrency: 1
---
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
  name: cassandra-artifacts-backup
  namespace: longhorn-system
spec:
  name: cassandra-artifacts-backup
  cron: "45 5 * * *"
  task: backup
  groups:
    - cassandra
    - cassandra-artifacts
  retain: 7
  concurrency: 1
---
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
  name: cassandra-artifacts-snapshot
  namespace: longhorn-system
spec:
  name: cassandra-artifacts-snapshot
  cron: "15 */6 * * *"
  task: snapshot
  groups:
    - cassandra
    - cassandra-artifacts
  retain: 8
  concurrency: 1
