apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus-deploy
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: prometheus-deploy
  template:
    metadata:
      labels:
        app: prometheus-deploy
    spec:
      containers:
      - name: prometheus-deploy
        image: prom/prometheus
        ports:
        - containerPort: 9090
        volumeMounts:
          - name: config-job
            mountPath: /etc/prometheus/prometheus.yml
            subPath: prometheus.yml
          - name: prometheus-volume
            mountPath: /etc/prometheus
      volumes:
        - name: config-job
          configMap:
            name: prometheus-config
        - name: prometheus-volume
          persistentVolumeClaim:
            claimName: prometheus-pvc