File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ spec:
328
328
- -v=5
329
329
- --csi-address=/csi/csi.sock
330
330
- --feature-gates=Topology=true
331
+ # end csi-provisioner args
331
332
securityContext :
332
333
# This is necessary only for systems with SELinux, where
333
334
# non-privileged sidecar containers cannot access unix domain socket
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ default_kubelet_data_dir=/var/lib/kubelet
70
70
# implies that refreshing that image has to be done manually.
71
71
#
72
72
# As a special case, 'none' as registry removes the registry name.
73
-
73
+ # Set VOLUME_MODE_CONVERSION_TESTS to "true" to enable the feature in external-provisioner.
74
74
75
75
# The default is to use the RBAC rules that match the image that is
76
76
# being used, also in the case that the image gets overridden. This
@@ -138,6 +138,10 @@ function version_gt() {
138
138
test " $( printf ' %s' " $versions " | sort -V | head -n 1) " ! = " $greaterVersion "
139
139
}
140
140
141
+ function volume_mode_conversion () {
142
+ [ " ${VOLUME_MODE_CONVERSION_TESTS} " == " true" ]
143
+ }
144
+
141
145
# In addition, the RBAC rules can be overridden separately.
142
146
# For snapshotter 2.0+, the directory has changed.
143
147
SNAPSHOTTER_RBAC_RELATIVE_PATH=" rbac.yaml"
210
214
echo " deploying hostpath components"
211
215
for i in $( ls ${BASE_DIR} /hostpath/* .yaml | sort) ; do
212
216
echo " $i "
217
+ if volume_mode_conversion; then
218
+ sed -i -e ' s/# end csi-provisioner args/- \"--prevent-volume-mode-conversion=true\"\n # end csi-provisioner args/' $i
219
+ fi
213
220
modified=" $( cat " $i " | sed -e " s;${default_kubelet_data_dir} /;${KUBELET_DATA_DIR} /;" | while IFS= read -r line; do
214
221
nocomments=" $( echo " $line " | sed -e ' s/ *#.*$//' ) "
215
222
if echo " $nocomments " | grep -q ' ^[[:space:]]*image:[[:space:]]*' ; then
You can’t perform that action at this time.
0 commit comments