Class PodRetention

    • Constructor Detail

      • PodRetention

        public PodRetention()
    • Method Detail

      • getKubernetesCloudDefault

        public static PodRetention getKubernetesCloudDefault()
        Returns the default PodRetention for a KubernetesCloud instance.
        the Never PodRetention strategy.
      • getPodTemplateDefault

        public static PodRetention getPodTemplateDefault()
        Returns the default PodRetention for a PodTemplate instance.
        the Default PodRetention strategy.
      • shouldDeletePod

        public abstract boolean shouldDeletePod​(KubernetesCloud cloud,
                                                Supplier<io.fabric8.kubernetes.api.model.Pod> pod)
        Determines if a agent pod should be deleted after the Jenkins build completes.
        cloud - - the KubernetesCloud the agent pod belongs to.
        pod - - the Pod running the Jenkins build.
        true if the agent pod should be deleted.