Skip to content

Commit 6f58568

Browse files
Issue kptdev#993 - tidy small things in setup script
1 parent dabef99 commit 6f58568

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

test/disaster/deployment/setup.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,11 @@ KPT_REPO='https://github.com/kptdev/kpt.git'
2828
cd "$PORCH_DIR"
2929

3030
cleandown_before=${CLEANDOWN_BEFORE:-true}
31-
cleanup_after=${CLEANUP_AFTER:-true}
3231

3332
data_kind_cluster="porch-disaster-test-data"
3433
crcache_kind_cluster="porch-disaster-test-crcache"
3534
dbcache_kind_cluster="porch-disaster-test-dbcache"
3635

37-
if [[ $cleandown_before = "true" ]]; then
38-
rm -rf "$self_dir/kubeconfigs"
39-
mkdir "$self_dir/kubeconfigs"
40-
fi
41-
4236
data_cluster_kubeconfig_file="$self_dir/kubeconfigs/data_cluster.conf"
4337
crcache_kubeconfig_file="$self_dir/kubeconfigs/porch_crcache.conf"
4438
dbcache_kubeconfig_file="$self_dir/kubeconfigs/porch_dbcache.conf"
@@ -62,6 +56,8 @@ function porchctl_dbcache() {
6256
h1 "Cleandown before install"
6357

6458
if [[ $cleandown_before = "true" ]]; then
59+
rm -rf "$self_dir/kubeconfigs"
60+
mkdir "$self_dir/kubeconfigs"
6561
kind delete cluster --name "$data_kind_cluster" || true
6662
kind delete cluster --name "$crcache_kind_cluster" || true
6763
kind delete cluster --name "$dbcache_kind_cluster" || true
@@ -159,7 +155,6 @@ mkdir "$self_dir"/edge1 && cd "$self_dir"/edge1 && {
159155

160156
h1 "Create Porch repositories for workload"
161157
sed -i -e 's/\[GITEA_PLACEHOLDER\]/nephio:secret@'"$gitea_ip"':3000/' "$self_dir"/load-repositories/*.yaml
162-
# repo_total="$(grep -R "kind: Repository" "$self_dir"/load-repositories/*.yaml | wc -l)"
163158
for file in "$self_dir"/load-repositories/*.yaml; do
164159
h2 "Creating repositories in batch $file"
165160
kubectl_dbcache apply -f "$file"

0 commit comments

Comments
 (0)