apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: loki
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: loki
  serviceName: loki
  template:
    metadata:
      labels:
        app.kubernetes.io/name: loki
    spec:
      containers:
        - name: loki
          image: index.docker.io/grafana/loki
          args:
            - -config.file=/config/config.yaml
          ports:
            - containerPort: 3100
              name: http
            - containerPort: 9096
              name: grpc
          volumeMounts:
            - mountPath: /config
              name: config
            - mountPath: /data
              name: data
      volumes:
        - name: config
          configMap:
            name: loki
        - name: data
          hostPath:
            path: /opt/c32/loki
