# Deployment dashboard-metrics-scraper
kind: Deployment
apiVersion: apps/v1
metadata:
  name: dashboard-metrics-scraper
  namespace: kubernetes-dashboard
  labels:
    k8s-app: dashboard-metrics-scraper
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      k8s-app: dashboard-metrics-scraper
  template:
    metadata:
      labels:
        k8s-app: dashboard-metrics-scraper
      annotations:
        seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
    spec:
      serviceAccountName: kubernetes-dashboard
      nodeSelector:
        kubernetes.io/os: linux
      # Comment the following tolerations if Dashboard must not be deployed on master
      # tolerations:
      # - key: node-role.kubernetes.io/master
      #   effect: NoSchedule
      containers:
      - name: dashboard-metrics-scraper
        image: ${DOCKER_HUB}/kubernetesui/metrics-scraper:v1.0.6
        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
      volumes:
      - name: tmp-volume
        emptyDir: {}
