kind: CronJob
apiVersion: batch/v1
metadata:
  name: instaloader
  namespace: download
spec:
  jobTemplate:
    spec:
      template:
        metadata:
          labels:
            app.kubernetes.io/instance: instaloader
            app.kubernetes.io/name: instaloader
        spec:
          nodeSelector:
            kubernetes.io/hostname: "ix-truenas"
          containers:
            - name: instaloader
              image: ghcr.io/tbrtje/instaloader:main
              securityContext:
                allowPrivilegeEscalation: false
              volumeMounts:
                - mountPath: /data
                  name: data
                - mountPath: /config
                  name: config
          restartPolicy: OnFailure
          volumes:
            - name: data
              hostPath:
                path: /mnt/bigboy/scrape/instagram
            - name: config
              configMap:
                name: private-config
          securityContext:
            runAsUser: 1000
            fsGroup: 1000
  schedule: "0 13,17 * * *"
