Skip to content

Commit

Permalink
Add /etc/environment to inspection report
Browse files Browse the repository at this point in the history
Adding etc/environment to inspection report will help check proxy settings while solving deployment problems

KU-2197
  • Loading branch information
maci3jka committed Nov 26, 2024
1 parent a6d3bfd commit 28b1e0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions k8s/scripts/inspect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ function is_service_active {
systemctl status "snap.$service" | grep -q "active (running)"
}

function collect_environment {
log_info "Copy environment file to the final report tarball"
cp -r --no-preserve=mode,ownership /etc/environment "$INSPECT_DUMP"
}

function collect_args {
log_info "Copy service args to the final report tarball"
cp -r --no-preserve=mode,ownership /var/snap/k8s/common/args "$INSPECT_DUMP"
Expand Down Expand Up @@ -211,6 +216,9 @@ collect_k8s_diagnostics
printf -- 'Collecting networking information\n'
collect_network_diagnostics

printf -- 'Collecting environment information\n'
collect_environment

matches=$(grep -rlEi "BEGIN CERTIFICATE|PRIVATE KEY" inspection-report)
if [ -n "$matches" ]; then
matches_comma_separated=$(echo "$matches" | tr '\n' ',')
Expand Down

0 comments on commit 28b1e0d

Please sign in to comment.