Skip to content
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

feat: sonobuoy collector #1469

Merged
merged 2 commits into from
Feb 16, 2024
Merged

feat: sonobuoy collector #1469

merged 2 commits into from
Feb 16, 2024

Conversation

emosbaugh
Copy link
Member

@emosbaugh emosbaugh commented Feb 13, 2024

Description, Motivation and Context

Retrieve sonobuoy results from the cluster and store them in the bundle. An analyzer would be beneficial as a follow up.

replicatedhq/troubleshoot.sh#547

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

@emosbaugh emosbaugh added the type::feature New feature or request label Feb 13, 2024
@emosbaugh emosbaugh marked this pull request as ready for review February 13, 2024 17:48
@emosbaugh emosbaugh requested a review from a team as a code owner February 13, 2024 17:48
@emosbaugh emosbaugh force-pushed the feat-sonobuoy-collector branch from 04c592d to eb7bde4 Compare February 13, 2024 18:03
ec := make(chan error, 1)

restClient := client.CoreV1().RESTClient()
req := restClient.Post().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could you log the command being run? When testing this I couldn't get results so wanted to test using kubectl. Grabbing the parameters from logs would be nice

Some high level logs like "results were collected", "could not collect anything... "...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

 Collecting support bundle ⠙ sonobuoyI0215 06:46:55.370095   50799 sonobuoy_results.go:132] Sonobuoy collector runing command: kubectl exec -n sonobuoy sonobuoy -c kube-sonobuoy -- /sonobuoy splat /tmp/sonobuoy
 Collecting support bundle ⠼ sonobuoyI0215 06:46:56.623800   50799 sonobuoy_results.go:99] Sonobuoy collector found file: 202402151442_sonobuoy_ca07019f-7be9-4c54-9449-e1611c7cc5a8.tar.gz

Copy link
Member

@banjoh banjoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm not able to collect any results using k exec -n sonobuoy -it sonobuoy -c kube-sonobuoy -- /sonobuoy splat /tmp/sonobuoy or when running support-bundle. I'm probably missing something here. How can I test this?

banjoh
banjoh previously requested changes Feb 14, 2024
Copy link
Member

@banjoh banjoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment to remove approve.

@emosbaugh
Copy link
Member Author

Hmm. I'm not able to collect any results using k exec -n sonobuoy -it sonobuoy -c kube-sonobuoy -- /sonobuoy splat /tmp/sonobuoy or when running support-bundle. I'm probably missing something here. How can I test this?

You will first have to run sonobuoy in your cluster

sonobuoy run --mode quick --wait

@emosbaugh emosbaugh force-pushed the feat-sonobuoy-collector branch from a7a9995 to 7e6bc39 Compare February 15, 2024 14:52
@emosbaugh emosbaugh requested a review from banjoh February 15, 2024 15:00
@banjoh banjoh dismissed their stale review February 16, 2024 14:53

Paired with Ethan and it works

@emosbaugh emosbaugh merged commit e24ca64 into main Feb 16, 2024
25 checks passed
@emosbaugh emosbaugh deleted the feat-sonobuoy-collector branch February 16, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants