Debug on exit standalone
What does this MR do and why?
In this MR, the main changes are:
- Notes: During reviewing session make sure that whole the latest modification are taking into account
- Create debug and exit dump log function (environment, bootstrap, management cluster and workload cluster) working on standalone mode.
- We’ve included
run_command
script function, which executes a given command and handles the output differently depending on whether it’s running in a continuous integration (CI) environment. This ensures that the command's output is properly managed and logged in both CI and non-CI contexts. So the kubectl command deals with like
Before
kubectl get events -A -o yaml | format_and_sort_events include-ns > $dump_dir/events.log
Now
dump_command "kubectl get events -A -o yaml | format_and_sort_events include-ns" "$dump_dir/events.log"
Related reference(s)
close #1222
Test coverage
Manual tests: run the script interactively from the bootstrap VM in the following setups:
-
environment -
bootstrap cluster failed and failed management cluster install -
management cluster deployed -
management cluster deployed and failed workload cluster install -
workload cluster deployed
Edited by emmanuel wyckens