Update helper methods to print and parse ReadWriteOncePod access mode
Kubernetes-commit: 5f98f6cfa47e2fcfad46822638b4fd167d8c41df
This commit is contained in:
parent
8bd9f6c9c6
commit
cb8bf2d275
|
|
@ -45,7 +45,7 @@ func IsDefaultAnnotationText(obj metav1.ObjectMeta) string {
|
|||
}
|
||||
|
||||
// GetAccessModesAsString returns a string representation of an array of access modes.
|
||||
// modes, when present, are always in the same order: RWO,ROX,RWX.
|
||||
// modes, when present, are always in the same order: RWO,ROX,RWX,RWOP.
|
||||
func GetAccessModesAsString(modes []v1.PersistentVolumeAccessMode) string {
|
||||
modes = removeDuplicateAccessModes(modes)
|
||||
modesStr := []string{}
|
||||
|
|
@ -58,6 +58,9 @@ func GetAccessModesAsString(modes []v1.PersistentVolumeAccessMode) string {
|
|||
if ContainsAccessMode(modes, v1.ReadWriteMany) {
|
||||
modesStr = append(modesStr, "RWX")
|
||||
}
|
||||
if ContainsAccessMode(modes, v1.ReadWriteOncePod) {
|
||||
modesStr = append(modesStr, "RWOP")
|
||||
}
|
||||
return strings.Join(modesStr, ",")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue