apiVersion: batch/v1
kind: Job
metadata:
  name: servicex-transform
spec:
  backoffLimit: 6 # number of retries before throwing error
  activeDeadlineSeconds: 360 # time to allow job to run
  template:
    metadata:
      labels:
        app: kubernetes-series
        tier: job
    spec:
      restartPolicy: OnFailure
      volumes:
        - name: servicex-storage
          persistentVolumeClaim:
            claimName: servicex-pvc
      containers:
        - name: job
          image: bengal1/servicex_transformer:standalone
          volumeMounts:
          - mountPath: "/data"
            name: servicex-storage
          # environment variables for the Pod
          env:
          - name: GCLOUD_PROJECT
            value: PROJECT_NAME
          - name: MESSAGE
            value: I am a single run job
          - name: FOREIGN_SERVICE
            value: http://endpoints.default.svc.cluster.local/single
          - name: NODE_ENV
            value: production
          args: ["-f", "/data/AOD.11182705._000001.pool.root.1"]
