little-angry-clouds / kubernetes-binaries-managers

Kubernetes related binaries manager.
GNU General Public License v3.0
102 stars 10 forks source link

Install automatically when using .binary_version #1

Open alexppg opened 4 years ago

alexppg commented 4 years ago

When using .kubectl_version or .helm_version, the manager should install the binary version when detecting that's not installed.

gcavalcante8808 commented 1 year ago

@alexppg at least for helm, I use the following script to add this behavior:

#! /usr/bin/env bash

if [[ -f ".helm_version" ]]; then
    helmenv install "$(cat .helm_version)"
    helmenv use "$(cat .helm_version)"
fi

exec helm-wrapper "$@"

Just install the script above as /usr/local/bin/helm and left helm-wrapper and helmenv in the path.