Uploaded image for project: 'OpenShift Pod Autoscaling'
  1. OpenShift Pod Autoscaling
  2. PODAUTO-105

postStart lifecycle prevents eviction of pods which exceed ephemeral storage limits

XMLWordPrintable

    • Icon: Spike Spike
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • False
    • False
    • Impediment

      If a pod has ephemeral storage limits, the kubelet should be able to cause an eviction, regardless of lifecycle handlers which might be running.

      Currently, a pod with a long-running postStart handler is never terminated even if evicted.

      Example pod:

       

      apiVersion: v1
      kind: Pod
      metadata:
        name: test2
      spec:
        containers:
        - name: test
          image: busybox
          command:
            - /bin/sh
          args:
            - -c
            - |-
              _term() {
                  echo "Caught SIGTERM signal!"
              }
              trap _term SIGTERM
              while true; do
                dd if=/dev/zero of=/tmp/zero bs=1M count=20 oflag=append conv=notrunc
                sleep 3600
              done
          resources:
            limits:
              cpu: "100m"
              memory: "50Mi"
              ephemeral-storage: "10Mi"
          lifecycle:
            postStart:
              exec:
                command:
                  - sleep
                  - inf
      

       

            joelsmith.redhat Joel Smith
            joelsmith.redhat Joel Smith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: