apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus-adapter
  namespace: openshift-monitoring
spec:
  replicas: 2
  selector:
    matchLabels:
      name: prometheus-adapter
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        name: prometheus-adapter
    spec:
      containers:
      - args:
        - --prometheus-auth-config=/etc/prometheus-config/prometheus-config.yaml
        - --config=/etc/adapter/config.yaml
        - --logtostderr=true
        - --metrics-relist-interval=1m
        - --prometheus-url=https://prometheus-k8s.openshift-monitoring.svc:9091
        - --secure-port=6443
        image: quay.io/coreos/k8s-prometheus-adapter-amd64:v0.8.2
        name: prometheus-adapter
        ports:
        - containerPort: 6443
        resources:
          requests:
            cpu: 1m
            memory: 25Mi
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /tmp
          name: tmpfs
          readOnly: false
        - mountPath: /etc/adapter
          name: config
          readOnly: false
        - mountPath: /etc/prometheus-config
          name: prometheus-adapter-prometheus-config
          readOnly: false
        - mountPath: /etc/ssl/certs
          name: serving-certs-ca-bundle
          readOnly: false
      nodeSelector:
        kubernetes.io/os: linux
      priorityClassName: system-cluster-critical
      securityContext: {}
      serviceAccountName: prometheus-adapter
      volumes:
      - emptyDir: {}
        name: tmpfs
      - configMap:
          name: adapter-config
        name: config
      - configMap:
          name: prometheus-adapter-prometheus-config
        name: prometheus-adapter-prometheus-config
      - configMap:
          name: serving-certs-ca-bundle
        name: serving-certs-ca-bundle
