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