java.lang.Object
hudson.model.AbstractDescribableImpl<PodVolume>
org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume
All Implemented Interfaces:
Describable<PodVolume>, Serializable
Direct Known Subclasses:
ConfigMapVolume, DynamicPVCVolume, EmptyDirVolume, GenericEphemeralVolume, HostPathVolume, NfsVolume, PersistentVolumeClaim, PodVolumes.PodVolume, SecretVolume

public abstract class PodVolume extends AbstractDescribableImpl<PodVolume> implements Serializable
Base class for all Kubernetes volume types
See Also:
  • Constructor Details

    • PodVolume

      public PodVolume()
  • Method Details

    • getMountPath

      public abstract String getMountPath()
    • buildVolume

      public io.fabric8.kubernetes.api.model.Volume buildVolume(String volumeName, String podName)
      It's expected to override at least one of buildVolume(String, String) or buildVolume(String).
      Parameters:
      volumeName - The name of the volume to build.
      Returns:
      The built volume.
    • buildVolume

      @Deprecated public io.fabric8.kubernetes.api.model.Volume buildVolume(String volumeName)
      Deprecated.
      It's expected to override at least one of buildVolume(String, String) or buildVolume(String).
      Parameters:
      volumeName - The name of the volume to build.
      Returns:
      The built volume.
    • createVolume

      public io.fabric8.kubernetes.api.model.PersistentVolumeClaim createVolume(io.fabric8.kubernetes.client.KubernetesClient client, io.fabric8.kubernetes.api.model.ObjectMeta podMetaData)
      Creates a volume claim.
      Parameters:
      client - Kubernetes client
      podMetaData - Kubernetes pod metadata
      Returns:
      the created volume claim
    • podVolumeExists

      public static boolean podVolumeExists(String path, List<PodVolume> existingVolumes)
    • volumeMountExists

      public static boolean volumeMountExists(String path, Iterable<io.fabric8.kubernetes.api.model.VolumeMount> existingMounts)