7
7
8
8
import io .kubernetes .client .custom .Quantity ;
9
9
import io .kubernetes .client .openapi .models .V1HostPathVolumeSource ;
10
+ import io .kubernetes .client .openapi .models .V1NFSVolumeSource ;
10
11
import io .swagger .annotations .ApiModelProperty ;
11
12
import org .apache .commons .lang3 .builder .EqualsBuilder ;
12
13
import org .apache .commons .lang3 .builder .HashCodeBuilder ;
@@ -26,6 +27,12 @@ public class PersistentVolumeSpec {
26
27
+ " or SELinux relabeling." )
27
28
private V1HostPathVolumeSource hostPath ;
28
29
30
+ @ ApiModelProperty ("nfs represents an NFS mount on the host. Provisioned by an admin. More info:\n "
31
+ + "https://kubernetes.io/docs/concepts/storage/volumes#nfs\n "
32
+ + "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do"
33
+ + " not support ownership management or SELinux relabeling." )
34
+ private V1NFSVolumeSource nfs ;
35
+
29
36
@ ApiModelProperty ("PersistentVolumeReclaimPolicy defines what happens to a persistent volume when released from"
30
37
+ " its claim. Valid options are Retain (default for manually created PersistentVolumes),"
31
38
+ " Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated)."
@@ -59,6 +66,15 @@ public PersistentVolumeSpec hostPath(V1HostPathVolumeSource hostPath) {
59
66
return this ;
60
67
}
61
68
69
+ public V1NFSVolumeSource getNfs () {
70
+ return nfs ;
71
+ }
72
+
73
+ public PersistentVolumeSpec nfs (V1NFSVolumeSource nfs ) {
74
+ this .nfs = nfs ;
75
+ return this ;
76
+ }
77
+
62
78
public PersistentVolumeSpec persistentVolumeReclaimPolicy (String persistentVolumeReclaimPolicy ) {
63
79
this .persistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy ;
64
80
return this ;
@@ -116,6 +132,7 @@ public String toString() {
116
132
new ToStringBuilder (this )
117
133
.append ("capacity" , capacity )
118
134
.append ("hostPath" , hostPath )
135
+ .append ("nfs" , nfs )
119
136
.append ("persistentVolumeReclaimPolicy" , persistentVolumeReclaimPolicy )
120
137
.append ("storageClassName" , storageClassName )
121
138
.append ("volumeMode" , volumeMode );
@@ -128,6 +145,7 @@ public int hashCode() {
128
145
HashCodeBuilder builder = new HashCodeBuilder ()
129
146
.append (capacity )
130
147
.append (hostPath )
148
+ .append (nfs )
131
149
.append (persistentVolumeReclaimPolicy )
132
150
.append (storageClassName )
133
151
.append (volumeMode );
@@ -148,6 +166,7 @@ public boolean equals(Object other) {
148
166
new EqualsBuilder ()
149
167
.append (capacity , rhs .capacity )
150
168
.append (hostPath , rhs .hostPath )
169
+ .append (nfs , rhs .nfs )
151
170
.append (persistentVolumeReclaimPolicy , rhs .persistentVolumeReclaimPolicy )
152
171
.append (storageClassName , rhs .storageClassName )
153
172
.append (volumeMode , rhs .volumeMode );
0 commit comments