apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mapreduce-historyserver
spec:
  selector:
    matchLabels: {}
  serviceName: mapreduce-historyserver
  replicas: 1
  template:
    spec:
      initContainers:
      - name: wait-for-history-dir
        image: zookage-util
        args:
        - wait-for-job
        - hdfs-setup
      containers:
      - name: historyserver
        image: zookage-util
        command:
        - /opt/hadoop/bin/mapred
        args:
        - historyserver
        envFrom:
        - configMapRef:
            name: hadoop-env
        readinessProbe:
          tcpSocket:
            port: 10020
        securityContext:
          runAsUser: 1013
          runAsGroup: 1010
        volumeMounts:
        - name: hadoop-conf
          mountPath: /etc/hadoop/conf
        - name: mnt
          mountPath: /mnt
        - name: package-hadoop
          mountPath: /opt/hadoop
      terminationGracePeriodSeconds: 5
      volumes:
      - name: hadoop-conf
        configMap:
          name: hadoop-conf
      - name: mnt
        emptyDir: {}
      - name: package-hadoop
        persistentVolumeClaim:
          claimName: package-hadoop
  volumeClaimTemplates: []
