From 5c17d845b2351e7757a1cec29dbe613a7bafdb41 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 15 Feb 2024 13:27:37 +0100 Subject: [PATCH] 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 --- scripts/install-snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-snapshot.sh b/scripts/install-snapshot.sh index 378061716..91e8fa780 100755 --- a/scripts/install-snapshot.sh +++ b/scripts/install-snapshot.sh @@ -71,7 +71,7 @@ function create_or_delete_resource() { 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_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 # Argument to add/update