Class LoggingKubernetesExecutor
java.lang.Object
com.atlassian.bamboo.agent.ephemeral.KubernetesExecutor
com.atlassian.bamboo.agent.ephemeral.LoggingKubernetesExecutor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoggingKubernetesExecutor(BambooHomeLocator homeLocator, String kubectlCmd, EphemeralAgentManagementLogger ephemeralAgentManagementLogger) -
Method Summary
Modifier and TypeMethodDescription@NotNull DeleteAgentPodResultdeleteAgentPod(@Nullable String pathToConfig, @NotNull String podName) @NotNull DeleteAgentPodsResultdeleteAgentPods(@NotNull EphemeralAgentsConfiguration config) @NotNull DeleteAgentPodsResultdeleteAgentPods(@Nullable String pathToConfig, @NotNull List<String> podNames) @NotNull DeleteAgentPodsResultdeleteAgentPodsIfNotInPhase(@NotNull EphemeralAgentsConfiguration config, @NotNull List<PodPhase> podPhasesToSkip) @NotNull DeleteAgentPodsResultdeleteNonActiveAgentPods(@NotNull EphemeralAgentsConfiguration config) Deletes non-active Ephemeral Agent pods based on the provided configuration.getPods(@NotNull EphemeralAgentsConfiguration config) @NotNull LaunchAgentPodResultlaunchAgentPod(@Nullable String pathToConfig, @NotNull File fileWithPodTemplate) @NotNull LaunchAgentPodResultlaunchAgentPod(@Nullable String pathToConfig, @NotNull File fileWithPodTemplate, @NotNull String podName, @NotNull String launchingPurposeKey, @NotNull String templateName, int retryCounter, int maxRetries) @NotNull TestConnectionResulttestConnection(@Nullable String pathToConfig) Methods inherited from class com.atlassian.bamboo.agent.ephemeral.KubernetesExecutor
describePod, getPod, getPodContainerLogs, getPodJsonResults
-
Field Details
-
LAUNCHING_EPHEMERAL_AGENT_POD
- See Also:
-
-
Constructor Details
-
LoggingKubernetesExecutor
public LoggingKubernetesExecutor(BambooHomeLocator homeLocator, String kubectlCmd, EphemeralAgentManagementLogger ephemeralAgentManagementLogger)
-
-
Method Details
-
testConnection
@NotNull public @NotNull TestConnectionResult testConnection(@Nullable @Nullable String pathToConfig) - Overrides:
testConnectionin classKubernetesExecutor
-
launchAgentPod
@NotNull public @NotNull LaunchAgentPodResult launchAgentPod(@Nullable @Nullable String pathToConfig, @NotNull @NotNull File fileWithPodTemplate) - Overrides:
launchAgentPodin classKubernetesExecutor
-
launchAgentPod
@NotNull public @NotNull LaunchAgentPodResult launchAgentPod(@Nullable @Nullable String pathToConfig, @NotNull @NotNull File fileWithPodTemplate, @NotNull @NotNull String podName, @NotNull @NotNull String launchingPurposeKey, @NotNull @NotNull String templateName, int retryCounter, int maxRetries) - Overrides:
launchAgentPodin classKubernetesExecutor
-
getPods
- Overrides:
getPodsin classKubernetesExecutor
-
deleteAgentPod
@NotNull public @NotNull DeleteAgentPodResult deleteAgentPod(@Nullable @Nullable String pathToConfig, @NotNull @NotNull String podName) - Overrides:
deleteAgentPodin classKubernetesExecutor
-
deleteAgentPods
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPods(@NotNull @NotNull EphemeralAgentsConfiguration config) - Overrides:
deleteAgentPodsin classKubernetesExecutor
-
deleteAgentPods
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPods(@Nullable @Nullable String pathToConfig, @NotNull @NotNull List<String> podNames) - Overrides:
deleteAgentPodsin classKubernetesExecutor
-
deleteAgentPodsIfNotInPhase
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPodsIfNotInPhase(@NotNull @NotNull EphemeralAgentsConfiguration config, @NotNull @NotNull List<PodPhase> podPhasesToSkip) - Overrides:
deleteAgentPodsIfNotInPhasein classKubernetesExecutor
-
deleteNonActiveAgentPods
@NotNull public @NotNull DeleteAgentPodsResult deleteNonActiveAgentPods(@NotNull @NotNull EphemeralAgentsConfiguration config) Deletes non-active Ephemeral Agent pods based on the provided configuration. If debug is enabled and deletedPodNames is empty, log the deletion to the Bamboo logs only, otherwise if deletedPodNames is not empty, log the result to the Bamboo logs and to the pods log page (UI)- Overrides:
deleteNonActiveAgentPodsin classKubernetesExecutor- Parameters:
config- The Ephemeral Agents configuration.- Returns:
- The result of the deletion operation.
-