
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: hbase-master
spec:
  serviceName: hbase-master
  replicas: 1
  selector:
    matchLabels:
      app: hbase
      component: master
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        app: hbase
        component: master
    spec:
      containers:
      - name: hbase-master
        image: flokkr/hbase
        args:
        - hbase
        - master
        - start
        volumeMounts:
        - name: data
          mountPath: /data
        - name: mount
          mountPath: /opt/smoketest
        envFrom:
        - configMapRef:
            name: hbase-config
        - configMapRef:
            name: hdfs-config
      volumes:
      - name: config
        configMap:
          name: hbase-config
      - name: data
        emptyDir: {}
      - name: script
        configMap:
          name: hbase-init-hdfs
          defaultMode: 493
      - name: mount
        hostPath:
          path: /home/elek/projects/flokkr/docker-hbase/examples/smoketest
      initContainers:
      - name: script
        image: flokkr/hadoop:3.2.1
        args:
        - /opt/script/init.sh
        volumeMounts:
        - name: script
          mountPath: /opt/script/init.sh
          subPath: init.sh
        - name: mount
          mountPath: /opt/smoketest
        envFrom:
        - configMapRef:
            name: hdfs-config
