
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: ozone-scm
  labels:
    app: ozone
    component: scm
spec:
  selector:
    matchLabels:
      app: ozone
      component: scm
  serviceName: ozone-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: flokkr/ozone:0.5.0-beta
        args:
        - ozone
        - scm
        - --init
        volumeMounts:
        - name: data
          mountPath: /data
        envFrom:
        - configMapRef:
            name: ozone-config
      containers:
      - name: scm
        image: flokkr/ozone:0.5.0-beta
        args:
        - ozone
        - scm
        volumeMounts:
        - name: data
          mountPath: /data
        envFrom:
        - configMapRef:
            name: ozone-config
      volumes:
      - name: data
        emptyDir:
          medium: Memory
