Skip to content

Commit

Permalink
script: Added migration script for LB legacy network
Browse files Browse the repository at this point in the history
  • Loading branch information
Xartos committed Jul 25, 2024
1 parent 9b4848e commit 9c66d8d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions migration/v2.25/prepare/20-add-lb-legacy-network.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

if [[ "${CK8S_CLUSTER}" =~ ^(sc|both)$ ]]; then
tfvars_file="${CK8S_CONFIG_PATH}/sc-config/cluster.tfvars"
if ! grep -P "^loadbalancer_legacy_network" "${tfvars_file}" >/dev/null; then
echo "loadbalancer_legacy_network = true" >> "${tfvars_file}"
fi
fi
if [[ "${CK8S_CLUSTER}" =~ ^(wc|both)$ ]]; then
tfvars_file="${CK8S_CONFIG_PATH}/wc-config/cluster.tfvars"
if ! grep -P "^loadbalancer_legacy_network" "${tfvars_file}" >/dev/null; then
echo "loadbalancer_legacy_network = true" >> "${tfvars_file}"
fi
fi

0 comments on commit 9c66d8d

Please sign in to comment.