Skip to content

Commit

Permalink
ci: adjust the snapshot to enable vgs
Browse files Browse the repository at this point in the history
updating the snapshot container ARG
to enable the vgs feature.

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Dec 13, 2024
1 parent 40880e8 commit 29d853a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/install-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ function create_or_delete_resource() {

if [ "${operation}" == "create" ]; then
# Argument to add/update
ARGUMENT="--enable-volume-group-snapshots=true"
ARGUMENT="--feature-gates=CSIVolumeGroupSnapshot=true"
# Check if the argument is already present and set to false
if grep -q -E "^\s+-\s+--enable-volume-group-snapshots=false" "${temp_snap_controller}"; then
sed -i -E "s/^\s+-\s+--enable-volume-group-snapshots=false$/ - $ARGUMENT/" "${temp_snap_controller}"
if grep -q -E "^\s+-\s+--feature-gates=CSIVolumeGroupSnapshot=false" "${temp_snap_controller}"; then
sed -i -E "s/^\s+-\s+----feature-gates=CSIVolumeGroupSnapshot=false$/ - $ARGUMENT/" "${temp_snap_controller}"
# Check if the argument is already present and set to true
elif grep -q -E "^\s+-\s+--enable-volume-group-snapshots=true" "${temp_snap_controller}"; then
elif grep -q -E "^\s+-\s+--feature-gates=CSIVolumeGroupSnapshot=true" "${temp_snap_controller}"; then
echo "Argument already present and matching."
else
# Add the argument if it's not present
Expand Down

0 comments on commit 29d853a

Please sign in to comment.