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

Use kubectl cluster-info dump for saving logs #2327

Closed
wants to merge 1 commit into from

Conversation

d-uzlov
Copy link

@d-uzlov d-uzlov commented Nov 18, 2022

Issue: #1195

This PR works but it's not finished

How it works:

  • kubectl cluster-info dump supports specifying namespaces to gather logs and state from
  • At the beginning of the test we remember the list of namespaces present in the cluster.
  • At the end of the test we look at current list of namespaces and save those that are new
  • This works as long as each test creates it's own namespace and doesn't work in existing ones
  • Logs from nsm-system and spire namespaces are dumped at the end of the test suite

Limitations:

  • cluster-info doesn't support time separation. It always saves all logs from the start of the container.
    Previously we saved nsm and spire logs in slices, separated by the test time, so you don't have to search for a specific test in the whole long log from the whole test suite.
  • cluster-info doesn't support --previous flag. It can only save logs from the most recent containers, but not from the dead and restarted ones
  • cluster-info saves info from one pod into one file. If there are several containers in a file, the file will have several sections of ==== START logs for container ...==== END logs for container ...

TODO:

  • There are no optimizations for multi-cluster setups. There weren't any before this PR, and in current state this PR doesn't touch it.

Signed-off-by: Danil Uzlov <DanilUzlov@yandex.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant