Skip to content

Commit b5092f4

Browse files
committed
Mark DynamicPVC as deprecated
1 parent ccfd496 commit b5092f4

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes/DynamicPVCVolume.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@
2222

2323
/**
2424
* Implements a dynamic PVC volume, that is created before the agent pod is created, and terminated afterwards.
25+
*
26+
* @deprecated Use {@link GenericEphemeralVolume} instead.
2527
*/
2628
@SuppressFBWarnings(
2729
value = "SE_NO_SERIALVERSIONID",
2830
justification = "Serialization happens exclusively through XStream and not Java Serialization.")
31+
@Deprecated
2932
public class DynamicPVCVolume extends PodVolume implements DynamicPVC {
3033
private String id;
3134
private String storageClassName;
@@ -109,12 +112,12 @@ public int hashCode() {
109112
return Objects.hash(id, storageClassName, requestsSize, accessModes);
110113
}
111114

112-
@Extension
115+
@Extension(ordinal = -100) // Display at the end of the select list
113116
@Symbol("dynamicPVC")
114117
public static class DescriptorImpl extends Descriptor<PodVolume> {
115118
@Override
116119
public String getDisplayName() {
117-
return "Dynamic Persistent Volume Claim";
120+
return "Dynamic Persistent Volume Claim (deprecated)";
118121
}
119122

120123
@SuppressWarnings("unused") // by stapler

src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes/workspace/DynamicPVCWorkspaceVolume.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323

2424
/**
2525
* @author <a href="[email protected]">runzexia</a>
26+
*
27+
* @deprecated Use {@link GenericEphemeralWorkspaceVolume} instead.
2628
*/
2729
@SuppressFBWarnings(
2830
value = "SE_NO_SERIALVERSIONID",
2931
justification = "Serialization happens exclusively through XStream and not Java Serialization.")
32+
@Deprecated
3033
public class DynamicPVCWorkspaceVolume extends WorkspaceVolume implements DynamicPVC {
3134
private String storageClassName;
3235
private String requestsSize;
@@ -95,12 +98,12 @@ public int hashCode() {
9598
return Objects.hash(storageClassName, requestsSize, accessModes);
9699
}
97100

98-
@Extension
101+
@Extension(ordinal = -100) // Display at the end of the select list
99102
@Symbol("dynamicPVC")
100103
public static class DescriptorImpl extends Descriptor<WorkspaceVolume> {
101104
@Override
102105
public String getDisplayName() {
103-
return "Dynamic Persistent Volume Claim";
106+
return "Dynamic Persistent Volume Claim (deprecated)";
104107
}
105108

106109
@SuppressWarnings("unused") // by stapler

src/main/resources/org/csanchez/jenkins/plugins/kubernetes/volumes/DynamicPVCVolume/config.jelly

+3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
33
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
44
<f:description>
5+
<em>This feature is deprecated. Please use generic ephemeral volume instead, which provides the same functionality without requiring explicit RBAC permissions to create persistent volume claims.</em>
6+
<p>
57
Allocates a PVC dynamically using the specified parameters, then deletes it when the pod is deleted.
68
Note that this requires the Jenkins controller to have additional RBAC permissions than are typically needed for agent provisioning.
9+
</p>
710
</f:description>
811

912
<f:entry title="${%Mount path}" field="mountPath">

src/main/resources/org/csanchez/jenkins/plugins/kubernetes/volumes/workspace/DynamicPVCWorkspaceVolume/config.jelly

+3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
33
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
44
<f:description>
5+
<em>This feature is deprecated. Please use generic ephemeral volume instead, which provides the same functionality without requiring explicit RBAC permissions to create persistent volume claims.</em>
6+
<p>
57
Allocates a PVC dynamically using the specified parameters, then deletes it when the pod is deleted.
68
Note that this requires the Jenkins controller to have additional RBAC permissions than are typically needed for agent provisioning.
9+
</p>
710
</f:description>
811

912
<f:entry title="${%Storage Class Name}" field="storageClassName">

0 commit comments

Comments
 (0)