apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    ksonnet.io/component: prometheus
    kustomize.component: prometheus
  name: prometheus
  namespace: stackdriver
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prometheus
      kustomize.component: prometheus
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: prometheus
        kustomize.component: prometheus
      name: prometheus
      namespace: stackdriver
    spec:
      containers:
      - image: gcr.io/stackdriver-prometheus/stackdriver-prometheus:release-0.4.2
        imagePullPolicy: Always
        name: prometheus
        ports:
        - containerPort: 9090
          name: web
        resources:
          limits:
            cpu: 400m
            memory: 1000Mi
          requests:
            cpu: 20m
            memory: 50Mi
        volumeMounts:
        - mountPath: /etc/prometheus
          name: config-volume
      serviceAccountName: prometheus
      volumes:
      - configMap:
          name: prometheus
        name: config-volume
