Class DynamicPVCVolume
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<PodVolume>
-
- org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume
-
- org.csanchez.jenkins.plugins.kubernetes.volumes.DynamicPVCVolume
-
- All Implemented Interfaces:
Describable<PodVolume>
,Serializable
,DynamicPVC
public class DynamicPVCVolume extends PodVolume implements DynamicPVC
Implements a dynamic PVC volume, that is created before the agent pod is created, and terminated afterwards.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DynamicPVCVolume.DescriptorImpl
-
Field Summary
-
Fields inherited from interface org.csanchez.jenkins.plugins.kubernetes.volumes.DynamicPVC
LOGGER
-
-
Constructor Summary
Constructors Constructor Description DynamicPVCVolume()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.fabric8.kubernetes.api.model.Volume
buildVolume(String volumeName, String podName)
It's expected to override at least one ofPodVolume.buildVolume(String, String)
orPodVolume.buildVolume(String)
.io.fabric8.kubernetes.api.model.PersistentVolumeClaim
createVolume(io.fabric8.kubernetes.client.KubernetesClient client, io.fabric8.kubernetes.api.model.ObjectMeta podMetaData)
Creates a volume claim.boolean
equals(Object o)
String
getAccessModes()
String
getMountPath()
String
getPvcName(String podName)
String
getRequestsSize()
String
getStorageClassName()
int
hashCode()
void
setAccessModes(String accessModes)
void
setMountPath(String mountPath)
void
setRequestsSize(String requestsSize)
void
setStorageClassName(String storageClassName)
-
Methods inherited from class org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume
buildVolume, podVolumeExists, volumeMountExists
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.csanchez.jenkins.plugins.kubernetes.volumes.DynamicPVC
buildPVC, createPVC, getAccessModesOrDefault, getRequestsSizeOrDefault, getResourceMap, getStorageClassNameOrDefault
-
-
-
-
Method Detail
-
getAccessModes
@CheckForNull public String getAccessModes()
- Specified by:
getAccessModes
in interfaceDynamicPVC
-
setAccessModes
@DataBoundSetter public void setAccessModes(@CheckForNull String accessModes)
-
getRequestsSize
@CheckForNull public String getRequestsSize()
- Specified by:
getRequestsSize
in interfaceDynamicPVC
-
setRequestsSize
@DataBoundSetter public void setRequestsSize(@CheckForNull String requestsSize)
-
getStorageClassName
@CheckForNull public String getStorageClassName()
- Specified by:
getStorageClassName
in interfaceDynamicPVC
-
setStorageClassName
@DataBoundSetter public void setStorageClassName(@CheckForNull String storageClassName)
-
getMountPath
public String getMountPath()
- Specified by:
getMountPath
in classPodVolume
-
buildVolume
public io.fabric8.kubernetes.api.model.Volume buildVolume(String volumeName, String podName)
Description copied from class:PodVolume
It's expected to override at least one ofPodVolume.buildVolume(String, String)
orPodVolume.buildVolume(String)
.- Overrides:
buildVolume
in classPodVolume
- 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)
Description copied from class:PodVolume
Creates a volume claim.- Overrides:
createVolume
in classPodVolume
- Parameters:
client
- Kubernetes clientpodMetaData
- Kubernetes pod metadata- Returns:
- the created volume claim
-
setMountPath
@DataBoundSetter public void setMountPath(String mountPath)
-
getPvcName
@NonNull public String getPvcName(String podName)
- Specified by:
getPvcName
in interfaceDynamicPVC
-
-