Class LoggingKubernetesExecutor
java.lang.Object
com.atlassian.bamboo.agent.ephemeral.KubernetesExecutor
com.atlassian.bamboo.agent.ephemeral.LoggingKubernetesExecutor
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLoggingKubernetesExecutor
(BambooHomeLocator homeLocator, String kubectlCmd, EphemeralAgentManagementLogger ephemeralAgentManagementLogger) -
Method Summary
Modifier and TypeMethodDescription@NotNull DeleteAgentPodResult
deleteAgentPod
(@Nullable String pathToConfig, @NotNull String podName) @NotNull DeleteAgentPodsResult
deleteAgentPods
(@NotNull EphemeralAgentsConfiguration config) @NotNull DeleteAgentPodsResult
deleteAgentPods
(@Nullable String pathToConfig, @NotNull List<String> podNames) @NotNull DeleteAgentPodsResult
deleteAgentPodsIfNotInPhase
(@NotNull EphemeralAgentsConfiguration config, @NotNull List<PodPhase> podPhasesToSkip) @NotNull DeleteAgentPodsResult
deleteNonActiveAgentPods
(@NotNull EphemeralAgentsConfiguration config) Deletes non-active Ephemeral Agent pods based on the provided configuration.getPods
(@NotNull EphemeralAgentsConfiguration config) @NotNull LaunchAgentPodResult
launchAgentPod
(@Nullable String pathToConfig, @NotNull File fileWithPodTemplate) @NotNull LaunchAgentPodResult
launchAgentPod
(@Nullable String pathToConfig, @NotNull File fileWithPodTemplate, @NotNull String podName, @NotNull String launchingPurposeKey, @NotNull String templateName, int retryCounter, int maxRetries) @NotNull TestConnectionResult
testConnection
(@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:
testConnection
in classKubernetesExecutor
-
launchAgentPod
@NotNull public @NotNull LaunchAgentPodResult launchAgentPod(@Nullable @Nullable String pathToConfig, @NotNull @NotNull File fileWithPodTemplate) - Overrides:
launchAgentPod
in 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:
launchAgentPod
in classKubernetesExecutor
-
getPods
- Overrides:
getPods
in classKubernetesExecutor
-
deleteAgentPod
@NotNull public @NotNull DeleteAgentPodResult deleteAgentPod(@Nullable @Nullable String pathToConfig, @NotNull @NotNull String podName) - Overrides:
deleteAgentPod
in classKubernetesExecutor
-
deleteAgentPods
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPods(@NotNull @NotNull EphemeralAgentsConfiguration config) - Overrides:
deleteAgentPods
in classKubernetesExecutor
-
deleteAgentPods
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPods(@Nullable @Nullable String pathToConfig, @NotNull @NotNull List<String> podNames) - Overrides:
deleteAgentPods
in classKubernetesExecutor
-
deleteAgentPodsIfNotInPhase
@NotNull public @NotNull DeleteAgentPodsResult deleteAgentPodsIfNotInPhase(@NotNull @NotNull EphemeralAgentsConfiguration config, @NotNull @NotNull List<PodPhase> podPhasesToSkip) - Overrides:
deleteAgentPodsIfNotInPhase
in 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:
deleteNonActiveAgentPods
in classKubernetesExecutor
- Parameters:
config
- The Ephemeral Agents configuration.- Returns:
- The result of the deletion operation.
-