Class EphemeralContainerStepExecution
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
io.jenkins.plugins.kubernetes.ephemeral.EphemeralContainerStepExecution
- All Implemented Interfaces:
Serializable
public class EphemeralContainerStepExecution
extends org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
Ephemeral Container step execution is responsible for creating a new Ephemeral Container
to the current Kubernetes agent Pod. A container is added to the Pod with a file monitor
command that waits until a file is created to signal the container should exit. This
implementation has a number of retry mechanisms to deal with high kubelet load that
may cause a context deadline miss or conflict errors patching the Pod itself.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.Block, org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.TailCall -
Method Summary
Modifier and TypeMethodDescriptionbooleanstart()protected voidAttempt to start ephemeral container and retry is start failed.voidMethods inherited from class org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
blocksRestart, getStatus, onResume, runMethods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
acceptAll, acceptAll, applyAll, applyAll, getContext, getStatusBounded
-
Method Details
-
start
- Specified by:
startin classorg.jenkinsci.plugins.workflow.steps.StepExecution- Throws:
Exception
-
startEphemeralContainerWithRetry
Attempt to start ephemeral container and retry is start failed. This function handles common retry scenarios that may occur during heavy cluster load or lots of ephemeral containers starting at once.- Throws:
Exception- if container start fails or interrupted
-
stop
- Overrides:
stopin classorg.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution- Throws:
Exception
-