Class PodContainerSource.DefaultPodContainerSource

java.lang.Object
org.csanchez.jenkins.plugins.kubernetes.PodContainerSource
org.csanchez.jenkins.plugins.kubernetes.PodContainerSource.DefaultPodContainerSource
All Implemented Interfaces:
ExtensionPoint
Enclosing class:
PodContainerSource

@Extension public static final class PodContainerSource.DefaultPodContainerSource extends PodContainerSource
Default implementation of PodContainerSource that only searches the primary pod containers. Ephemeral or init containers are not included container lookups in this implementation.
See Also:
  • PodSpec.getContainers()
  • Constructor Details

    • DefaultPodContainerSource

      public DefaultPodContainerSource()
  • Method Details

    • getContainerWorkingDir

      public Optional<String> getContainerWorkingDir(@NonNull io.fabric8.kubernetes.api.model.Pod pod, @NonNull String containerName)
      Description copied from class: PodContainerSource
      Lookup the working directory of the named container.
      Specified by:
      getContainerWorkingDir in class PodContainerSource
      Parameters:
      pod - pod reference to lookup container in
      containerName - name of container to lookup
      Returns:
      working directory path if container found and working dir specified, otherwise empty
    • getContainerStatus

      public Optional<io.fabric8.kubernetes.api.model.ContainerStatus> getContainerStatus(@NonNull io.fabric8.kubernetes.api.model.Pod pod, @NonNull String containerName)
      Description copied from class: PodContainerSource
      Lookup the status of the named container.
      Specified by:
      getContainerStatus in class PodContainerSource
      Parameters:
      pod - pod reference to lookup container in
      containerName - name of container to lookup
      Returns:
      container status if found, otherwise empty