ci: fix image version replacement

canary tag is no more used in the
snapshotter yaml and latest version are
used, instead of searching for tag check
for the image name and do sed to replace
the required tag only.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2024-02-15 13:27:37 +01:00 committed by mergify[bot]
parent 11031091ef
commit 5c17d845b2

View File

@ -71,7 +71,7 @@ function create_or_delete_resource() {
curl -o "${temp_snap_controller}" "${SNAPSHOT_CONTROLLER}" curl -o "${temp_snap_controller}" "${SNAPSHOT_CONTROLLER}"
sed -i "s/namespace: kube-system/namespace: ${namespace}/g" "${temp_rbac}" sed -i "s/namespace: kube-system/namespace: ${namespace}/g" "${temp_rbac}"
sed -i "s/namespace: kube-system/namespace: ${namespace}/g" "${temp_snap_controller}" sed -i "s/namespace: kube-system/namespace: ${namespace}/g" "${temp_snap_controller}"
sed -i "s/canary/${SNAPSHOT_VERSION}/g" "${temp_snap_controller}" sed -i -E "s/(image: registry\.k8s\.io\/sig-storage\/snapshot-controller:).*$/\1$SNAPSHOT_VERSION/g" "${temp_snap_controller}"
if [ "${operation}" == "create" ]; then if [ "${operation}" == "create" ]; then
# Argument to add/update # Argument to add/update