apiVersion: apps/v1
kind: Deployment
metadata:
  name: juicer
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: juicer
  template:
    metadata:
      labels:
        app: juicer
    spec:
      serviceAccountName: jumppod
      restartPolicy: Always
      imagePullSecrets:
      - name: local-registry
      containers:
      - image: eubrabigsea/juicer:latest
        command: ['/usr/local/juicer/sbin/juicer-daemon.sh']
        args: ['docker']
        imagePullPolicy: Always
        name: juicer
        volumeMounts:
        - name: "juicer-config"
          mountPath: "/usr/local/juicer/conf/juicer-config.yaml"
          subPath: "juicer-config.yaml"
        - name: "hdfs-site"
          mountPath: "/usr/local/juicer/conf/hdfs-site.xml"
          subPath: "hdfs-site.xml"
        - name: hdfs-pvc
          mountPath: /srv/storage/
        env:
        - name: HADOOP_CONF_DIR
          value: /usr/local/juicer/conf
      restartPolicy: Always
      volumes:
      - name: "juicer-config"
        configMap:
          name: "juicer-config"
      - name: "hdfs-site"
        configMap:
          name: "hdfs-site"
      - name: hdfs-pvc
        persistentVolumeClaim:
          claimName: hdfs-pvc
