apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus
  labels:
    app: prometheus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prometheus
  template:
    metadata:
      labels:
        app: prometheus
    spec:
      containers:
      - name: prometheus
        image: pi-1:5000/prometheus-armv7:2.7.1
        ports:
        - containerPort: 9090
        volumeMounts:
        - name: prometheus-config-volume
          mountPath: /etc/prometheus/prometheus.yml
          subPath: prometheus.yml
        - name: prometheus-rules-volume
          mountPath: /etc/prometheus/rules
        - name: prometheus-data
          mountPath: /prometheus
        imagePullPolicy: Always
      volumes:
        - name: prometheus-config-volume
          configMap:
            name: prometheus-config
        - name: prometheus-rules-volume
          configMap:
            name: prometheus-rules
        - name: prometheus-data
          rbd:
            monitors:
            - 'pi-1:6789'
            pool: volumes
            image: prometheus-data
            fsType: ext4
            readOnly: false
            user: admin
            secretRef:
              name: ceph-secret