Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix is kubectl connected #12

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function is_kubectl_connected_to_k8s_cluster () {

local cluster_info=$(kubectl cluster-info 2> $task_error_file)
local err=$(cat $task_error_file)
if [[ -z "$err" ]]; then
if [[ -z "$err" || "$err" != *"ERROR"* ]]; then
write_log "INFO" "$cluster_info"
return
fi
Expand Down
2 changes: 0 additions & 2 deletions scripts/linux/functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ function install_jq () {
local result=0

if [[ "$package_manager" = "apt-get" ]]; then
echo "apt-get" >> test.txt
sudo apt-get install -y jq >/dev/null 2>$task_error_file
if [[ $? -eq 0 ]]; then
echo "success apt-get" >> test.txt
Expand All @@ -166,7 +165,6 @@ function install_jq () {
fi

if [[ "$package_manager" = "yum" ]]; then
echo "yum" >> test.txt
sudo yum install -y jq >/dev/null 2>$task_error_file
if [[ $? -eq 0 ]]; then
echo "success yum" >> test.txt
Expand Down