apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: zookage-client
spec:
  selector:
    matchLabels: {}
  serviceName: zookage-client
  replicas: 1
  template:
    spec:
      containers:
      - name: sleep
        image: zookage-util
        args:
        - sleep
        - inf
        envFrom:
        - configMapRef:
            name: hadoop-env
        - configMapRef:
            name: hive-env
        - configMapRef:
            name: tez-env
        env:
        - name: PATH
          value: $(HIVE_HOME)/bin:$(HADOOP_HOME)/bin:/usr/local/openjdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        - name: HADOOP_CLASSPATH
          value: $(TEZ_CONF_DIR):$(TEZ_JARS)/*:$(TEZ_JARS)/lib/*
        securityContext:
          runAsUser: 1000
          runAsGroup: 1000
        volumeMounts:
        - name: hadoop-conf
          mountPath: /etc/hadoop/conf
        - name: hive-conf
          mountPath: /etc/hive/conf
        - name: tez-conf
          mountPath: /etc/tez/conf
        - name: package-hadoop
          mountPath: /opt/hadoop
        - name: package-hive
          mountPath: /opt/hive
        - name: package-tez
          mountPath: /opt/tez
        workingDir: /home/zookage
      terminationGracePeriodSeconds: 0
      volumes:
      - name: hadoop-conf
        configMap:
          name: hadoop-conf
      - name: hive-conf
        configMap:
          name: hive-conf
      - name: tez-conf
        configMap:
          name: tez-conf
      - name: package-hadoop
        persistentVolumeClaim:
          claimName: package-hadoop
      - name: package-hive
        persistentVolumeClaim:
          claimName: package-hive
      - name: package-tez
        persistentVolumeClaim:
          claimName: package-tez
  volumeClaimTemplates: []
