diff --git a/Dockerfile b/Dockerfile index 623b5ef..1246c6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ENV ARGO_VERSION="3.5.2" \ KUBECTX_VERSION="0.9.5" \ KUSTOMIZE_VERSION="4.5.7" \ KYVERNO_VERSION="1.9.5" \ - K9S_VERSION="0.28.2" \ + K9S_VERSION="0.29.1" \ MONGO_SHELL_VERSION="4.0.25" \ MYSQL_SHELL_VERSION="8.0.33-1" \ OC_VERSION="4.10.25" \ diff --git a/tools/check-k8s.sh b/tools/check-k8s.sh index c67f7ea..912ee14 100755 --- a/tools/check-k8s.sh +++ b/tools/check-k8s.sh @@ -20,9 +20,9 @@ checkClusterResources() { fi #--- Check pods - result="$(kubectl get pods -A --context ${context} --no-headers=true | grep -vE "Running|Completed|ContainerCreating|Terminating" | awk '{printf "%-18s %-6s %s\n", $4, $3, $1"/"$2}' | sort)" + result="$(kubectl get pods -A --context ${context} --no-headers=true | grep -vE "Running|Completed|ContainerCreating|Terminating" | awk '{printf "%-32s %-6s %s\n", $4, $3, $1"/"$2}' | sort)" if [ "${result}" != "" ] ; then - printf "\n%bSTATUS READY POD %b\n${result}\n" "${GREEN}" "${STD}" + printf "\n%bSTATUS READY POD %b\n${result}\n" "${GREEN}" "${STD}" fi #--- Check suspended/not ready flux resources (kustomization, helmchart, helmrelease, helmrepository, gitrepository) @@ -40,6 +40,12 @@ checkClusterResources() { if [ "${result}" != "" ] ; then printf "\n%bREADY SUSP. KIND NAMESPACE/NAME %b\n${result}\n" "${GREEN}" "${STD}" fi + + #--- Check pending services + pending_services="$(kubectl get svc -A --context ${context} --request-timeout=1s --no-headers=true 2>&1 | grep "LoadBalancer" | grep "" | awk '{print $1"/"$2}')" + if [ "${pending_services}" != "" ] ; then + printf "\n%bK8S pending services%b\n${pending_services}\n" "${GREEN}" "${STD}" + fi fi }