---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: dashboard-metrics-scraper
spec:
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      app: dashboard-metrics-scraper
  template:
    spec:
      containers:
        - name: dashboard-metrics-scraper
          image: kubernetesui/metrics-scraper:v1.0.7
          ports:
            - containerPort: 8000
              protocol: TCP
          livenessProbe:
            httpGet:
              scheme: HTTP
              path: /
              port: 8000
            initialDelaySeconds: 30
            timeoutSeconds: 30
          volumeMounts:
          - mountPath: /tmp
            name: tmp-volume
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsUser: 1001
            runAsGroup: 2001
      serviceAccountName: kubernetes-dashboard
      nodeSelector:
        "kubernetes.io/os": linux
      volumes:
        - name: tmp-volume
          emptyDir: {}
