Skip to content

Commit 47466c7

Browse files
maggiehe00rjeberhard
authored andcommitted
Add NFS support for OKD on release/4.1
1 parent 3f0b50c commit 47466c7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

integration-tests/src/test/java/oracle/weblogic/domain/PersistentVolumeSpec.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import io.kubernetes.client.custom.Quantity;
99
import io.kubernetes.client.openapi.models.V1HostPathVolumeSource;
10+
import io.kubernetes.client.openapi.models.V1NFSVolumeSource;
1011
import io.swagger.annotations.ApiModelProperty;
1112
import org.apache.commons.lang3.builder.EqualsBuilder;
1213
import org.apache.commons.lang3.builder.HashCodeBuilder;
@@ -26,6 +27,12 @@ public class PersistentVolumeSpec {
2627
+ " or SELinux relabeling.")
2728
private V1HostPathVolumeSource hostPath;
2829

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+
2936
@ApiModelProperty("PersistentVolumeReclaimPolicy defines what happens to a persistent volume when released from"
3037
+ " its claim. Valid options are Retain (default for manually created PersistentVolumes),"
3138
+ " Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated)."
@@ -59,6 +66,15 @@ public PersistentVolumeSpec hostPath(V1HostPathVolumeSource hostPath) {
5966
return this;
6067
}
6168

69+
public V1NFSVolumeSource getNfs() {
70+
return nfs;
71+
}
72+
73+
public PersistentVolumeSpec nfs(V1NFSVolumeSource nfs) {
74+
this.nfs = nfs;
75+
return this;
76+
}
77+
6278
public PersistentVolumeSpec persistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy) {
6379
this.persistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy;
6480
return this;
@@ -116,6 +132,7 @@ public String toString() {
116132
new ToStringBuilder(this)
117133
.append("capacity", capacity)
118134
.append("hostPath", hostPath)
135+
.append("nfs", nfs)
119136
.append("persistentVolumeReclaimPolicy", persistentVolumeReclaimPolicy)
120137
.append("storageClassName", storageClassName)
121138
.append("volumeMode", volumeMode);
@@ -128,6 +145,7 @@ public int hashCode() {
128145
HashCodeBuilder builder = new HashCodeBuilder()
129146
.append(capacity)
130147
.append(hostPath)
148+
.append(nfs)
131149
.append(persistentVolumeReclaimPolicy)
132150
.append(storageClassName)
133151
.append(volumeMode);
@@ -148,6 +166,7 @@ public boolean equals(Object other) {
148166
new EqualsBuilder()
149167
.append(capacity, rhs.capacity)
150168
.append(hostPath, rhs.hostPath)
169+
.append(nfs, rhs.nfs)
151170
.append(persistentVolumeReclaimPolicy, rhs.persistentVolumeReclaimPolicy)
152171
.append(storageClassName, rhs.storageClassName)
153172
.append(volumeMode, rhs.volumeMode);

0 commit comments

Comments
 (0)