Interface EphemeralAgentExecutionService
- All Known Implementing Classes:
EphemeralAgentKubernetesExecutionService
@PublicApi
public interface EphemeralAgentExecutionService
- Since:
- 9.3
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves pods with completed Agent execution.@NotNull DeleteAgentPodsResultDeletes all ephemeral agent pods in any pod state.@NotNull DeleteAgentPodResultDelete the pod with the requested name from the cluster if the one exists.@NotNull StringdescribePod(@NotNull String podName) Describe pod details in human-readable way.Gets names of pods with running agent container.@NotNull Optional<EphemeralAgentPod> Get pod detailsgetPodContainerLogs(@NotNull String podName, @NotNull Optional<String> containerName, @NotNull Optional<Integer> resultsLimit, @NotNull Optional<String> afterTimestamp) Gets either the whole pod or the particular pod container's logs.@NotNull List<EphemeralAgentPod> getPods()Get all pods.@NotNull LaunchAgentPodResultlaunch(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate, @NotNull CommonContext context) Deprecated.@NotNull LaunchAgentPodResultlaunch(@NotNull List<ImmutableEphemeralAgentTemplate> ephemeralAgentTemplates, @NotNull CommonContext context) Launch ephemeral agent based on delivered templates and context.
-
Method Details
-
launch
@NotNull @Deprecated @NotNull LaunchAgentPodResult launch(@NotNull @NotNull EphemeralAgentTemplate ephemeralAgentTemplate, @NotNull @NotNull CommonContext context) Deprecated.since 10.1, uselaunch(List, CommonContext)}Launch ephemeral agent based on delivered template and context.- Parameters:
ephemeralAgentTemplate- ephemeral configuration's templatecontext- buildable context- Returns:
- result of agent first synchronous launch
-
launch
@NotNull @NotNull LaunchAgentPodResult launch(@NotNull @NotNull List<ImmutableEphemeralAgentTemplate> ephemeralAgentTemplates, @NotNull @NotNull CommonContext context) Launch ephemeral agent based on delivered templates and context.- Parameters:
ephemeralAgentTemplates- ephemeral configuration's templatescontext- buildable context- Returns:
- result of agent first synchronous launch
- Since:
- 10.1
-
getPods
Get all pods.- Returns:
- list of ephemeral agent pod instances
-
getPod
Get pod details- Parameters:
podName- pod name
-
deletePod
Delete the pod with the requested name from the cluster if the one exists.- Parameters:
ephemeralAgentPodName- unique across cluster pod name- Returns:
- result of agent pod removal
-
describePod
@NotNull @NotNull String describePod(@NotNull @NotNull String podName) throws KubernetesExecutorException Describe pod details in human-readable way.- Parameters:
podName- pod name- Throws:
KubernetesExecutorException
-
clearNonActivePods
void clearNonActivePods()Removes pods with completed Agent execution. -
getPodContainerLogs
@NotNull @NotNull io.atlassian.fugue.Either<String,List<String>> getPodContainerLogs(@NotNull @NotNull String podName, @NotNull @NotNull Optional<String> containerName, @NotNull @NotNull Optional<Integer> resultsLimit, @NotNull @NotNull Optional<String> afterTimestamp) Gets either the whole pod or the particular pod container's logs. If the afterTimestamp is used, there must exist a log entry with this particular time stamp. Otherwise, an empty list will be returned.- Parameters:
podName- ephemeral configuration's templatecontainerName- optional name of the container, if empty the logs from the whole pod are requestedresultsLimit- limit of logs lines, if empty all logs are fetchedafterTimestamp- only log entries created after this timestamp will be taken- Returns:
- either error message if failed or list of log lines if successful
-
deleteAllPods
Deletes all ephemeral agent pods in any pod state.- Returns:
- result of pods removal
-
getNamesOfPodsWithRunningAgent
Gets names of pods with running agent container.- Returns:
- list of pod names if ephemeral agents are enabled, empty list otherwise
- Since:
- 9.5
-
launch(List, CommonContext)}