Class Reaper

  • All Implemented Interfaces:
    ExtensionPoint

    @Extension
    public class Reaper
    extends ComputerListener
    Checks for deleted pods corresponding to KubernetesSlave and ensures the node is removed from Jenkins too.

    If the pod has been deleted, all of the associated state (running user processes, workspace, etc.) must also be gone; so there is no point in retaining this agent definition any further. (KubernetesSlave is not an EphemeralNode: it does support running across Jenkins restarts.)

    Note that pod retention policies other than the default Never may disable this system, unless some external process or garbage collection policy results in pod deletion.