fix(k8s): update prerequisite messages in freeleaps-cluster-authenticator for consistency

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-01-14 16:46:25 +08:00
parent 7df990ddac
commit 940c0cc318

View File

@ -89,13 +89,13 @@ ensure_kubelogin() {
gather_prerequisites() {
gather_os_environment
echo "[PRE-PREREQUISITES] Checking for required tools..."
echo "[PREREQUISITES] Checking for required tools..."
if ! command -v curl > /dev/null; then
echo "[ERROR] curl is required to download kubectl and kubelogin"
exit 1
else
echo "[PRE-PREREQUISITES] curl: ✓"
echo "[PREREQUISITES] curl: ✓"
fi
@ -103,19 +103,19 @@ gather_prerequisites() {
echo "[ERROR] unzip is required to extract kubelogin"
exit 1
else
echo "[PRE-PREREQUISITES] unzip: ✓"
echo "[PREREQUISITES] unzip: ✓"
fi
if ! command -v uname > /dev/null; then
echo "[ERROR] uname is required to determine OS and architecture"
exit 1
else
echo "[PRE-PREREQUISITES] uname: ✓"
echo "[PREREQUISITES] uname: ✓"
fi
if ! command -v kubectl > /dev/null; then
if [ "${AUTO_INSTALL_KUBECTL}" = "true" ]; then
echo "[PRE-PREREQUISITES] kubectl: Installing..."
echo "[PREREQUISITES] kubectl: Installing..."
ensure_kubectl
else
echo "[ERROR] kubectl is required to authenticate with the cluster"
@ -123,12 +123,12 @@ gather_prerequisites() {
fi
else
echo "[PRE-PREREQUISITES] kubectl: ✓"
echo "[PREREQUISITES] kubectl: ✓"
fi
if ! command -v kubelogin > /dev/null; then
if [ "${AUTO_INSTALL_KUBECTL}" = "true" ]; then
echo "[PRE-PREREQUISITES] kubelogin: Installing..."
echo "[PREREQUISITES] kubelogin: Installing..."
ensure_kubelogin
else
echo "[ERROR] kubelogin is required to authenticate with the cluster"
@ -136,7 +136,7 @@ gather_prerequisites() {
fi
else
echo "[PRE-PREREQUISITES] kubelogin: ✓"
echo "[PREREQUISITES] kubelogin: ✓"
fi
}