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:
328328 - -v=5
329329 - --csi-address=/csi/csi.sock
330330 - --feature-gates=Topology=true
331+ # end csi-provisioner args
331332 securityContext :
332333 # This is necessary only for systems with SELinux, where
333334 # 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
7070# implies that refreshing that image has to be done manually.
7171#
7272# 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.
7474
7575# The default is to use the RBAC rules that match the image that is
7676# being used, also in the case that the image gets overridden. This
@@ -138,6 +138,10 @@ function version_gt() {
138138 test " $( printf ' %s' " $versions " | sort -V | head -n 1) " ! = " $greaterVersion "
139139}
140140
141+ function volume_mode_conversion () {
142+ [ " ${VOLUME_MODE_CONVERSION_TESTS} " == " true" ]
143+ }
144+
141145# In addition, the RBAC rules can be overridden separately.
142146# For snapshotter 2.0+, the directory has changed.
143147SNAPSHOTTER_RBAC_RELATIVE_PATH=" rbac.yaml"
210214echo " deploying hostpath components"
211215for i in $( ls ${BASE_DIR} /hostpath/* .yaml | sort) ; do
212216 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
213220 modified=" $( cat " $i " | sed -e " s;${default_kubelet_data_dir} /;${KUBELET_DATA_DIR} /;" | while IFS= read -r line; do
214221 nocomments=" $( echo " $line " | sed -e ' s/ *#.*$//' ) "
215222 if echo " $nocomments " | grep -q ' ^[[:space:]]*image:[[:space:]]*' ; then
You can’t perform that action at this time.
0 commit comments