mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Implement the feedback from filbranden
- Changed check_for_ppa to be parameterized - Added bash strictmode - refactored the package_status method to consume variables and be a bit nicer to future re-use of the method. - Cut out extra echo -n statements in favor of tr -d or native awk - Refactored branching logic paths to leverage double brackets - normalized local variable annotation - Updated globals to be all CAPS - remainder of filbrandens feedback in validate-cluster.sh
This commit is contained in:
@@ -55,7 +55,7 @@ echo "Found ${found} nodes."
|
||||
cat -n "${MINIONS_FILE}"
|
||||
|
||||
# On vSphere, use minion IPs as their names
|
||||
if [[ "${KUBERNETES_PROVIDER}" == "vsphere" ]] || [[ "${KUBERNETES_PROVIDER}" == "vagrant" ]] || [[ "${KUBERNETES_PROVIDER}" == "libvirt-coreos" ]] || [[ "${KUBERNETES_PROVIDER}" == "juju" ]] ; then
|
||||
if [[ "${KUBERNETES_PROVIDER}" == "vsphere" || "${KUBERNETES_PROVIDER}" == "vagrant" || "${KUBERNETES_PROVIDER}" == "libvirt-coreos" || "${KUBERNETES_PROVIDER}" == "juju" ]] ; then
|
||||
MINION_NAMES=("${KUBE_MINION_IP_ADDRESSES[@]}")
|
||||
fi
|
||||
|
||||
@@ -69,7 +69,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
fi
|
||||
|
||||
name="${MINION_NAMES[$i]}"
|
||||
if [ "$KUBERNETES_PROVIDER" != "vsphere" ] && [ "$KUBERNETES_PROVIDER" != "vagrant" ] && [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ] && [ "$KUBERNETES_PROVIDER" != "juju" ]; then
|
||||
if [[ "$KUBERNETES_PROVIDER" != "vsphere" && "$KUBERNETES_PROVIDER" != "vagrant" && "$KUBERNETES_PROVIDER" != "libvirt-coreos" && "$KUBERNETES_PROVIDER" != "juju" ]]; then
|
||||
# Grab fully qualified name
|
||||
name=$(grep "${MINION_NAMES[$i]}\." "${MINIONS_FILE}")
|
||||
fi
|
||||
@@ -79,7 +79,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
attempt=0
|
||||
while true; do
|
||||
echo -n "Attempt $((attempt+1)) at checking Kubelet installation on node ${MINION_NAMES[$i]} ..."
|
||||
if [ "$KUBERNETES_PROVIDER" != "libvirt-coreos" ] && [ "$KUBERNETES_PROVIDER" != "juju" ]; then
|
||||
if [[ "$KUBERNETES_PROVIDER" != "libvirt-coreos" && "$KUBERNETES_PROVIDER" != "juju" ]]; then
|
||||
curl_output=$(curl -s --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" \
|
||||
"https://${KUBE_MASTER_IP}/api/v1beta1/proxy/minions/${name}/healthz")
|
||||
else
|
||||
|
Reference in New Issue
Block a user