chore(support-bundle): Added readme, fix api_url retrieval (for >= 6.9), fixed a regex for detect double digit version
Added readme for support_bundle workaround for API_URL, fixed API_URL for Backend V6.9 and highers
I have removed the additional script and added the flags -la / --local-api that will automatically creates the kubernetes port forward.
While testing the script on a 6.10 and 6.11, I have spotted another bug. Support bundle script is unable to parse versions greater than 6.9 or 5.9, is going to return the error message:
We could not determine the backend version. Exiting.
I have changed the regex in order to fix it, this is what the previous regex was parsing:
I have renamed also the PR title
@patrickhargett @mbreitung could you please take a look at the PR and in case approve or suggesting any change if needed? 🙇
Hi team, LY is waiting for this release. Can we proceed with this release? Thanks.
Hi team, thank you for working on this. It worked fine in our lab, but LY got the same error in their environment.
% ./get_support_bundle.sh -a <MASKED_API_TOKEN> -n sysdigcloud
We could not determine the backend version. Exiting.
It does not seem to take into account the case where the Registry URL contains a port number, as in their environment.
- LY’s environment:
% kubectl -n sysdigcloud get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $2 }' | awk -F. '{ print $1 }'
4443/sysdig/sysdig-api
% kubectl -n sysdigcloud get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}'
cd.docker-registry.corp.yahoo.co.jp:4443/sysdig/sysdig-api:6.11.0.240423000256
- Our environment:
$ kubectl -n sysdig get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}' | awk -F: '{ print $2 }' | awk -F. '{ print $1 }'
6
$ kubectl -n sysdig get deployment sysdigcloud-api -ojsonpath='{.spec.template.spec.containers[0].image}'
quay.io/sysdig/sysdig-api:6.11.0.240423000256
Can you make a further update to take into account cases where the Registry URL includes a port number, as in their environment? What about determining the version by customerVersion via api as described in this thread? https://sysdigcloud.slack.com/archives/C03GJ1MN38Q/p1705660934469609?thread_ts=1705596392.908999&cid=C03GJ1MN38Q
Thanks,