apiVersion: apps/v1
kind: Deployment
metadata:
  name: heapster
  namespace: kube-system
  labels:
    application: heapster
    kubernetes.io/cluster-service: "true"
    version: v1.5.4
spec:
  replicas: 1
  selector:
    matchLabels:
      application: heapster
  template:
    metadata:
      labels:
        application: heapster
        version: v1.5.4
    spec:
      priorityClassName: system-cluster-critical
      serviceAccountName: heapster
      containers:
        - image: registry.opensource.zalan.do/teapot/heapster:v1.5.4
          name: heapster
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8082
              scheme: HTTP
            initialDelaySeconds: 180
            timeoutSeconds: 5
          resources:
            limits:
              cpu: 100m # don't remove unless nanny is disabled
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 200Mi
          command:
            - /heapster
            - --source=kubernetes.summary_api:''
        - image: registry.opensource.zalan.do/teapot/addon-resizer:2.0
          name: heapster-nanny
          resources:
            limits:
              cpu: 25m
              memory: 25Mi
            requests:
              cpu: 25m
              memory: 25Mi
          env:
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          command:
            - /pod_nanny
            - --cpu=80m
            - --extra-cpu=4m
            - --memory=200Mi
            - --extra-memory=4Mi
            - --recommendation-offset=5
            - --deployment=heapster
            - --container=heapster
            - --poll-period=300000
