File tree 1 file changed +0
-25
lines changed
1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -72,31 +72,6 @@ func validateVolumeCapabilities(vcs []*csi.VolumeCapability) error {
72
72
return err
73
73
}
74
74
}
75
- if err := crossValidateAccessModes (vcs ); err != nil {
76
- return err
77
- }
78
- return nil
79
- }
80
-
81
- func crossValidateAccessModes (vcs []* csi.VolumeCapability ) error {
82
- m := map [csi.VolumeCapability_AccessMode_Mode ]bool {}
83
-
84
- for _ , vc := range vcs {
85
- m [vc .GetAccessMode ().GetMode ()] = true
86
- }
87
-
88
- hasWriter := m [csi .VolumeCapability_AccessMode_SINGLE_NODE_WRITER ]
89
- hasSingleReader := m [csi .VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY ]
90
- hasMultiReader := m [csi .VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ]
91
-
92
- if hasWriter && (hasSingleReader || hasMultiReader ) {
93
- return fmt .Errorf ("both SINGLE_NODE_WRITER and READER_ONLY access mode specified" )
94
- }
95
-
96
- if hasSingleReader && hasMultiReader {
97
- return fmt .Errorf ("both SINGLE_NODE_READER_ONLY and MULTI_NODE_READY_ONLY specified" )
98
- }
99
-
100
75
return nil
101
76
}
102
77
You can’t perform that action at this time.
0 commit comments