Skip to content

Commit fb2c5a6

Browse files
authored
Merge pull request #240 from draios/fix/retrival-of-onprem-version-custom-registry
fix(support-bundle): Fix the retrieval of backend version when a registry with a custom port it's in use
2 parents c6eade3 + 2449296 commit fb2c5a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

support_bundle/get_support_bundle.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ main() {
151151
exit 1
152152
fi
153153

154-
echo "$(kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $2 }')" > ${LOG_DIR}/backend_version.txt
155-
BACKEND_VERSION=$(kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $2 }' | awk -F. '{ print $1 }') || true
154+
echo "$(kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $NF }')" > ${LOG_DIR}/backend_version.txt
155+
BACKEND_VERSION=$(kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $NF }' | awk -F. '{ print $1 }') || true
156156

157157
# If API key is supplied, check the backend version, and send a GET to the relevant endpoints.
158158
if [[ ! -z ${API_KEY} ]]; then

0 commit comments

Comments
 (0)