-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert dumpDiag to use kind export logs
#591
Conversation
testing before moving out of draft state |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 57.89% 9.95% -47.94%
==========================================
Files 43 43
Lines 3451 3455 +4
==========================================
- Hits 1998 344 -1654
- Misses 1189 3056 +1867
+ Partials 264 55 -209
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 35 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Example dump from a KIND cluster can be seen in artifacts here: https://github.com/redhat-et/bpfd/actions/runs/4481401852 |
From the functional perspective that looks good to me now. 🎉 The integration tests seem to be failing because of missing access to secrets, we need to figure out a way around it to make the PR green. In the meantime, we will also need a changelog entry for the changes. Bonus points from me for an integration test for Kind implementation that would ensure the dump functionality indeed works as expected if you have time for it. :) |
Rebased onto main after making the workflow skip tests that require secrets: #597 |
Thanks @czeslavo! I tested against a KIND cluster as mentioned above, but don't have a GKE cluster to test against :( |
Understood, let's skip GKE for now. What I meant was adding an automated integration test to our test suite under
You can run an individual integration test using |
+1 sorry I just saw your previous comment, I'll try and get to that Int test today! |
Just checking in on this one, any help needed? |
Yep sorry for the snail pace I started this locally just need to finish it up... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a test run with this on https://github.com/Kong/kubernetes-ingress-controller/actions/runs/4694072692?pr=3886 and it looks the describe info and resource dumps are getting lost with this change.
diagnostics-integration-tests-enterprise-postgres.zip has logs in the new KIND logs format, but no kubectl_get_all.yaml
or kubectl_describe_all.txt
. Am I missing somewhere else they got moved, or are those indeed getting lost somehow?
I think the dump of |
Updated to add back kubectl-decribe-all and kubectl-get-all for ALL diagnostic runs, Also added an integration test and updated the existing addon one. Just need to make sure |
Looks like we need to rebase for latest |
Today in KTF we manually step through all the pods/objects in the cluster to get debug information. KIND now supports simply running `kind export logs` which does a better job of giving us a cluster debug overview. Switch the DumpDiagnostics function to use this command for cluster log dumping instead. Intentionally leave the logic which allows each addon to write their own specific cleanup functionality. Also continue to export the `kubectl_describe_all.txt` and `kubectl_get_all.yaml` files for all cluster types. Signed-off-by: Andrew Stoycos <astoycos@redhat.com>
Add new integration test for using `kind export logs` in DumpDiagnostics. Update old addon test to use the new filepath for pod logs. Signed-off-by: Andrew Stoycos <astoycos@redhat.com>
Add godoc comment to DumpAllDescribeAll function. use t.cleanup instead of defer. Signed-off-by: Andrew Stoycos <astoycos@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing major from my side, just 2 nits to consider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Standardize function signatures for all cluster diagnostics functions. Standardize name of diagnostic output directory from a mixture of "output" and "outDir" to just "outdir". Signed-off-by: Andrew Stoycos <astoycos@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Today in KTF we manually step through all the pods/objects in the cluster to get debug information. KIND now supports simply running
kind export logs
which does a better job of giving us a cluster debug overview. Switch the DumpDiagnostics function to use this command for cluster log dumping instead.Intentionally leave the logic which allows each addon to write their own specific cleanup functionality.