apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pv-extract-totvs
spec:
  schedule: "*/1 * * * *"
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: pv-extract-totvs
            image: pontusvisiongdpr/pv-extract-wrapper:1.13.2
            env:
            - name: PV_TIMEOUT_MS
              value: "15000"
            - name: PV_GRAPHDB_URL_PREFIX
              value: http://graphdb-nifi:3001
            - name: PV_SECRET_MANAGER_ID
              value: "/run/secrets/totvs-json"
            - name: PV_REQUEST_URL
              value: "https://protheus-ws.sunnyvale.com.br:8009/pontusvision/pontusvision-lgpd-totvs-proteus/1.0.0/sa1_cliente/objs"
            imagePullPolicy: Always
            command:
            - /usr/bin/node 
            - dist/rest-handler/totvs/app.js
            volumeMounts:
            - mountPath: "/run/secrets/totvs-json"
              subPath: totvs-json
              name: totvs-json
            - mountPath: "/mnt/pv-extract-sharepoint-lambda/"
              name: pontus-extract-totvs-claim0
          volumes:
          - name: totvs-json
            secret:
              secretName: totvs-json
          - name: pontus-extract-totvs-claim0
            persistentVolumeClaim:
              claimName: pontus-extract-totvs-claim0

          restartPolicy: OnFailure
          #£concurrencyPolicy: Forbid
