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(auto): download-support-bundle.sh doesn't tolerate master node #1307

Closed
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
12 changes: 12 additions & 0 deletions test_framework/scripts/download-support-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,23 @@ set_kubeconfig_envvar(){
fi
}

set_master_node_taint_toleration() {
local LH_FRONTEND_ADDR=${1}

local JSON_PAYLOAD="{\"name\": \"taint-toleration\", \"type\": \"setting\", \"value\": \"node-role.kubernetes.io/master=true:NoExecute;node-role.kubernetes.io/master=true:NoSchedule\"}"

local CURL_CMD="curl -XPUT http://${LH_FRONTEND_ADDR}/v1/settings/taint-toleration -H 'Content-Type: application/json' -d '"${JSON_PAYLOAD}"'"

kubectl exec -n longhorn-system svc/longhorn-frontend -- bash -c "${CURL_CMD}"
}


set_kubeconfig_envvar ${TF_VAR_arch} ${TF_VAR_tf_workspace}

LH_FRONTEND_ADDR=`kubectl get svc -n longhorn-system longhorn-frontend -o json | jq -r '.spec.clusterIP + ":" + (.spec.ports[0].port|tostring)'`

set_master_node_taint_toleration ${LH_FRONTEND_ADDR}

JSON_PAYLOAD="{\"issueURL\": \"${SUPPORT_BUNDLE_ISSUE_DESC}\", \"description\": \"${SUPPORT_BUNDLE_ISSUE_DESC}\"}"

CURL_CMD="curl -XPOST http://${LH_FRONTEND_ADDR}/v1/supportbundles -H 'Accept: application/json' -H 'Accept-Encoding: gzip, deflate' -d '"${JSON_PAYLOAD}"'"
Expand Down