sysdig-cloud-scripts icon indicating copy to clipboard operation
sysdig-cloud-scripts copied to clipboard

chore(support-bundle): Added readme, fix api_url retrieval (for >= 6.9), fixed a regex for detect double digit version

Open victorbecerragit opened this issue 1 year ago • 2 comments

Added readme for support_bundle workaround for API_URL, fixed API_URL for Backend V6.9 and highers

victorbecerragit avatar May 06 '24 14:05 victorbecerragit

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: Screenshot 2024-05-09 at 10 28 00 Screenshot 2024-05-09 at 10 28 36

dark-vex avatar May 09 '24 10:05 dark-vex

I have renamed also the PR title

dark-vex avatar May 10 '24 10:05 dark-vex

@patrickhargett @mbreitung could you please take a look at the PR and in case approve or suggesting any change if needed? 🙇

dark-vex avatar Jun 17 '24 07:06 dark-vex

Hi team, LY is waiting for this release. Can we proceed with this release? Thanks.

amoriroma avatar Jul 01 '24 23:07 amoriroma

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,

amoriroma avatar Jul 23 '24 23:07 amoriroma