Skip to content

Commit

Permalink
Fix bash linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Oct 19, 2024
1 parent becf759 commit a26364a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
31 changes: 11 additions & 20 deletions _installers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,29 +173,20 @@ EOT
# install_k8s_addons() - Install Kubenertes AddOns
function install_k8s_addons {
echo "Installing Kubernetes AddOns"
pkgs=""
for pkg in ansible pip; do
if ! command -v "$pkg"; then
pkgs+=" $pkg"
fi
done
if [ -n "$pkgs" ]; then
curl -fsSL http://bit.ly/install_pkg | PKG=$pkgs bash
fi
_configure_ansible
_ansible_galaxy_install role
_ansible_galaxy_install collection

_run_ansible_cmd "$krd_playbooks/configure-addons.yml" "setup-addons.log" "$KRD_ADDONS_LIST"
}

# install_virtlet() - Install Virtlet
function install_virtlet {
_configure_ansible
_ansible_galaxy_install role
_ansible_galaxy_install collection

for addon in ${KRD_ADDONS_LIST//,/ }; do
echo "Deploying $addon using configure-$addon.yml playbook.."
_run_ansible_cmd "$krd_playbooks/configure-${addon}.yml" "setup-${addon}.log"
if [[ $KRD_ENABLE_TESTS == "true" ]]; then
pushd "$KRD_FOLDER"/tests
bash "${addon}".sh
popd
fi
done
_run_ansible_cmd "$krd_playbooks/configure-virtlet.yml" "setup-virtlet.log"
}

# install_istio() - Function that installs Istio
Expand Down Expand Up @@ -369,7 +360,7 @@ function install_argocd {
export ARGOCD_OPTS='--port-forward-namespace argocd-system --port-forward'
admin_pass=$(kubectl get secrets -n argocd-system argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d)
argocd login --username admin --password "$admin_pass"
argocd account update-password --account admin --current-password $admin_pass --new-password P4$$w0rd
argocd cluster add $(kubectl config get-contexts -o name) --yes
argocd account update-password --account admin --current-password "$admin_pass" --new-password P4$$w0rd
argocd cluster add "$(kubectl config get-contexts -o name)" --yes
kubectl delete secrets -n argocd-system argocd-initial-admin-secret --ignore-not-found
}
2 changes: 1 addition & 1 deletion node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ mount_partitions
disable_k8s_ports
create_pmem_namespaces
enable_nvdimm_mixed_mode
create_simulated_sriov_dev ${NODE_SRIOV_NUMVFS-0}
create_simulated_sriov_dev "${NODE_SRIOV_NUMVFS-0}"

if [ "$KRD_DEBUG" == "true" ]; then
if command -v lstopo-no-graphics >/dev/null; then
Expand Down

0 comments on commit a26364a

Please sign in to comment.