Skip to content

Commit d5437c4

Browse files
authored
add support collector script (#771)
Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
1 parent d0565d0 commit d5437c4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

support/collect-info.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
echo ''
4+
echo 'Oracle Backend for Spring Boot and Microservices'
5+
echo '------------------------------------------------'
6+
echo ''
7+
echo 'This script will collect information that could help Oracle'
8+
echo 'diagnose and fix issues with your environment. You should'
9+
echo 'generally only run this script if you have been asked to'
10+
echo 'by Oracle.'
11+
echo ''
12+
echo 'WARNING'
13+
echo ''
14+
echo 'This script generates two files named `all-resources.yaml`'
15+
echo 'and `cluster-info-dump`. It is possible, and likely, that'
16+
echo 'these files may contain private or sensitive information.'
17+
echo 'You MUST review the contents of the generated files BEFORE'
18+
echo 'providing those files to Oracle or anyone else.'
19+
echo ''
20+
21+
read -p "Do you want to continue? (y/n) " -n 1 -r
22+
echo
23+
if [[ ! $REPLY =~ ^[Yy]$ ]]
24+
then
25+
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
26+
fi
27+
28+
echo ''
29+
echo 'Collecting data, this may take a few minutes...'
30+
31+
kubectl get all -o custom-columns="KIND:.kind,NAME:.metadata.name" --no-headers=true > all-resources.yaml
32+
kubectl get crd -o custom-columns="KIND:.kind,NAME:.metadata.name" --no-headers=true | while read kind name; do
33+
kubectl get crd "$name" -o yaml >> all-resources.yaml
34+
done
35+
36+
kubectl cluster-info dump > cluster-info-dump
37+
38+
echo ''
39+
echo 'Data collection complete. Please review the output before sharing'

0 commit comments

Comments
 (0)