File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,12 @@ CSI_SNAPSHOTTER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/exte
82
82
83
83
INSTALL_CRD=${INSTALL_CRD:- " false" }
84
84
85
+ # Some images are not affected by *_REGISTRY/*_TAG and IMAGE_* variables.
86
+ # The default is to update unless explicitly excluded.
87
+ update_image () {
88
+ case " $1 " in socat) return 1;; esac
89
+ }
90
+
85
91
run () {
86
92
echo " $@ " >&2
87
93
" $@ "
@@ -121,9 +127,12 @@ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort); do
121
127
122
128
# Now replace registry and/or tag, if set as env variables.
123
129
# If not set, the replacement is the same as the original value.
124
- prefix=$( eval echo \$ {${varname} _REGISTRY:-${IMAGE_REGISTRY:- ${registry} } }/ | sed -e ' s;none/;;' )
125
- suffix=$( eval echo :\$ {${varname} _TAG:-${IMAGE_TAG:- ${tag} } })
126
- line=" $( echo " $nocomments " | sed -e " s;$image ;${prefix}${name}${suffix} ;" ) "
130
+ # Only do this for the images which are meant to be configurable.
131
+ if update_image " $name " ; then
132
+ prefix=$( eval echo \$ {${varname} _REGISTRY:-${IMAGE_REGISTRY:- ${registry} } }/ | sed -e ' s;none/;;' )
133
+ suffix=$( eval echo :\$ {${varname} _TAG:-${IMAGE_TAG:- ${tag} } })
134
+ line=" $( echo " $nocomments " | sed -e " s;$image ;${prefix}${name}${suffix} ;" ) "
135
+ fi
127
136
echo " using $line " >&2
128
137
fi
129
138
echo " $line "
155
164
156
165
# deploy snapshotclass
157
166
echo " deploying snapshotclass"
158
- kubectl create -f ${BASE_DIR} /snapshotter/csi-hostpath-snapshotclass.yaml
167
+ kubectl apply -f ${BASE_DIR} /snapshotter/csi-hostpath-snapshotclass.yaml
You can’t perform that action at this time.
0 commit comments