apiVersion: batch/v1
kind: Job
metadata:
  name: package-tez
spec:
  template:
    spec:
      containers:
      - name: zookage-tez
        image: zookage-tez
        command:
        - /bin/bash
        args:
        - -c
        - |
          rm -rf /mnt/zookage/tez
          cp -R /opt/tez /mnt/zookage/tez
          rm /mnt/zookage/tez/lib/slf4j-*
          rm /mnt/zookage/tez/lib/hadoop-mapreduce-client-*
        securityContext:
          runAsUser: 0
          runAsGroup: 0
        volumeMounts:
        - name: package-home
          mountPath: /mnt/zookage
      restartPolicy: Never
      volumes:
      - name: package-home
        hostPath:
          path: /opt/zookage
