apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-server
  namespace: kube-system
  labels:
    application: metrics-server
    version: v0.3.2
spec:
  replicas: 1
  selector:
    matchLabels:
      application: metrics-server
  template:
    metadata:
      name: metrics-server
      labels:
        application: metrics-server
        version: v0.3.2
    spec:
      dnsConfig:
        options:
          - name: ndots
            value: "1"
      priorityClassName: system-cluster-critical
      serviceAccountName: metrics-server
      containers:
      - name: metrics-server
        image: registry.opensource.zalan.do/teapot/metrics-server:v0.3.2
        resources:
          limits:
            cpu: "{{.ConfigItems.metrics_service_cpu}}"
            memory: "{{.ConfigItems.metrics_service_mem}}"
          requests:
            cpu: "{{.ConfigItems.metrics_service_cpu}}"
            memory: "{{.ConfigItems.metrics_service_mem}}"
        volumeMounts:
        - name: tmp-dir
          mountPath: /tmp
      volumes:
      # mount in tmp so we can safely use from-scratch images and/or read-only containers
      - name: tmp-dir
        emptyDir: {}
