
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: ozone-om
  labels:
    app: ozone
    component: om
spec:
  selector:
    matchLabels:
      app: ozone
      component: om
  serviceName: ozone-om
  replicas: 3
  template:
    metadata:
      labels:
        app: ozone
        component: om
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9874"
        prometheus.io/path: /prom
    spec:
      initContainers:
      - name: init
        image: elek/ozone-dev:be8a2fcc8
        args:
        - ozone
        - om
        - --init
        env:
        - name: WAITFOR
          value: ozone-scm-0.ozone-scm:9876
        volumeMounts:
        - name: data
          mountPath: /data
        - name: ozone-dev
          mountPath: /opt/ozone
        envFrom:
        - configMapRef:
            name: ozone-config
      containers:
      - name: om
        image: elek/ozone-dev:be8a2fcc8
        args:
        - ozone
        - om
        volumeMounts:
        - name: data
          mountPath: /data
        - name: ozone-dev
          mountPath: /opt/ozone
        envFrom:
        - configMapRef:
            name: ozone-config
      volumes:
      - name: data
        emptyDir: {}
      - name: ozone-dev
        hostPath:
          path: /home/elek/projects/ozone/hadoop-ozone/dist/target/ozone-0.6.0-SNAPSHOT/
