apiVersion: batch/v1
kind: CronJob
metadata:
  name: dd-cron-backup
  namespace: default
  labels:
    app: dd-cron-backup
    managed-by: underpost
spec:
  schedule: "0 1 * * *"
  concurrencyPolicy: Forbid
  startingDeadlineSeconds: 200
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
  suspend: false
  jobTemplate:
    spec:
      template:
        metadata:
          labels:
            app: dd-cron-backup
            managed-by: underpost
        spec:
          containers:
            - name: dd-cron-backup
              image: underpost/underpost-engine:v3.2.70
              command:
                - /bin/sh
                - -c
                - >
                  cd /home/dd/engine &&
                  node bin env dd-cron production &&
                  node bin cron dd-lampp,dd-cyberia,dd-core,dd-prototype,dd-test backup --git --kubeadm 
              volumeMounts:
                - mountPath: /home/dd/engine
                  name: underpost-cron-container-volume
                - mountPath: /usr/lib/node_modules/underpost
                  name: underpost-share-env
          volumes:
            - hostPath:
                path: /home/dd/engine
                type: Directory
              name: underpost-cron-container-volume
            - hostPath:
                path: /root/.nvm/versions/node/v24.15.0/lib/node_modules/underpost
                type: DirectoryOrCreate
              name: underpost-share-env
          restartPolicy: OnFailure
