apiVersion: apps/v1
kind: Deployment
metadata:
  name: tfm-prometheus
  labels:
    app: tfm-prometheus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tfm-prometheus
  template:
    metadata:
      labels:
        app: tfm-prometheus
    spec:
      containers:
      - name: prometheus
        image: prom/prometheus:v2.4.2
        args:
          - "--config.file=/etc/prometheus/prometheus.yml"
          - "--storage.tsdb.path=/prometheus/"
          #- "--web.listen-address=localhost:9100"
        ports:
        - containerPort: 9090
        volumeMounts:
          - name: prometheus-storage-volume
            mountPath: /prometheus/
          - name: prometheus-config-volume
            mountPath: /etc/prometheus/
      volumes:
        - name: prometheus-storage-volume
          emptyDir: {}
        - name: prometheus-config-volume
          configMap:
            name: tfm-prometheus-conf