From 7120593704ced21d24974b1706646fbe20b45276 Mon Sep 17 00:00:00 2001 From: Tim Walter Date: Tue, 22 Jun 2021 15:20:14 +0200 Subject: [PATCH 1/2] Remove ssh_scan Workaround Removes the workaround that replaced the `_` with `-` for `ssh-scan` when using it with helm. Signed-off-by: Tim Walter --- bin/install.sh | 3 +-- bin/uninstall.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index f598b4d28c..eda98cddc7 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -142,8 +142,7 @@ function installResources() { if [[ $unattended == True ]]; then for resource in "${resources[@]}"; do - local resource_name="${resource//+([_])/-}" # Necessary because ssh_scan is called ssh-scan - helm upgrade --install -n "$namespace" "$resource_name" "$resource_directory"/"$resource"/ \ + helm upgrade --install -n "$namespace" "$resource" "$resource_directory"/"$resource"/ \ || print "$COLOR_ERROR" "Installation of '$resource' failed" done diff --git a/bin/uninstall.sh b/bin/uninstall.sh index f3a82c8211..f78d42d682 100755 --- a/bin/uninstall.sh +++ b/bin/uninstall.sh @@ -31,8 +31,7 @@ function uninstallResources() { done for resource in "${resources[@]}"; do - local resource_name="${resource//+([_])/-}" # Necessary because ssh_scan is called ssh-scan - helm uninstall "$resource_name" || true + helm uninstall "$resource" || true done } From 8878d126d3918ad925349f4fa04607c4f361f40c Mon Sep 17 00:00:00 2001 From: Tim Walter Date: Tue, 22 Jun 2021 15:22:47 +0200 Subject: [PATCH 2/2] Rename demo-apps to demo-targets Renames remaining references of the demo-apps to demo-targets. Signed-off-by: Tim Walter --- bin/install.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index eda98cddc7..06060f5e12 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -35,7 +35,7 @@ BASE_DIR=$(dirname "${SCRIPT_DIRECTORY}") INSTALL_INTERACTIVE='' INSTALL_SCANNERS='' -INSTALL_DEMO_APPS='' +INSTALL_DEMO_TARGETS='' INSTALL_HOOKS='' function print() { @@ -153,8 +153,7 @@ function installResources() { read -r line if [[ $line == *[Yy] ]]; then - local resource_name="${resource//+([_])/-}" - helm upgrade --install -n "$namespace" "$resource_name" "$resource_directory"/"$resource"/ \ + helm upgrade --install -n "$namespace" "$resource" "$resource_directory"/"$resource"/ \ || print "$COLOR_ERROR" "Installation of '$resource' failed" fi done @@ -185,7 +184,7 @@ function interactiveInstall() { print print "Starting to install demo-targets..." - print "Do you want to install the demo apps in a separate namespace? Otherwise they will be installed into the [default] namespace [y/N]" + print "Do you want to install the demo targets in a separate namespace? Otherwise they will be installed into the [default] namespace [y/N]" read -r line NAMESPACE="default" if [[ $line == *[Yy] ]]; then @@ -218,7 +217,7 @@ function unattendedInstall() { installResources "$BASE_DIR/scanners" "default" True fi - if [[ -n "${INSTALL_DEMO_APPS}" ]]; then + if [[ -n "${INSTALL_DEMO_TARGETS}" ]]; then print "Starting to install demo-targets..." installResources "$BASE_DIR/demo-targets" "default" True fi @@ -244,7 +243,7 @@ function parseArguments() { shift # Pop current argument from array ;; --demo-targets) - INSTALL_DEMO_APPS='true' + INSTALL_DEMO_TARGETS='true' shift ;; --hooks) @@ -253,7 +252,7 @@ function parseArguments() { ;; --all) INSTALL_SCANNERS='true' - INSTALL_DEMO_APPS='true' + INSTALL_DEMO_TARGETS='true' INSTALL_HOOKS='true' shift ;;