apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: scm
  labels:
    app.kubernetes.io/component: ozone
spec:
  selector:
    matchLabels:
      app: ozone
      component: scm
  serviceName: scm
  replicas: 1
  template:
    metadata:
      labels:
        app: ozone
        component: scm
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9876"
        prometheus.io/path: /prom
    spec:
      initContainers:
        - name: init
          image: elek/ozone:20190604-3
          args:
            - ozone
            - scm
            - --init
          envFrom:
            - configMapRef:
                name: config
          volumeMounts:
            - name: data
              mountPath: /data
      containers:
        - name: scm
          image: elek/ozone:20190604-3
          args:
            - ozone
            - scm
          envFrom:
            - configMapRef:
                name: config
          volumeMounts:
            - name: data
              mountPath: /data
      volumes:
        - name: data
          emptyDir: {}