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

refactor(kubernetes): manage log streaming at pod-level #303

Closed
wants to merge 34 commits into from

Commits on Apr 8, 2022

  1. Configuration menu
    Copy the full SHA
    c9ece53 View commit details
    Browse the repository at this point in the history
  2. feat(k8s): Use PodTracker in WaitContainer

    Replaces manual Pods Watch API call with a "container is terminated" signal
    in a containerTracker. That signal is controlled by the PodTracker based
    on Add/Update/Delete pod events from the PodInformer (which does its own
    watch/list API calls internally).
    cognifloyd committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    acbe508 View commit details
    Browse the repository at this point in the history
  3. chore: minor cleanup

    cognifloyd committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    9f84d3e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5e2d3bb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e25ffe View commit details
    Browse the repository at this point in the history
  6. chore: lint fixes

    cognifloyd committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    67387f4 View commit details
    Browse the repository at this point in the history
  7. refactor: podTracker.Containers should have containerTracker refs

    the containerTracker has locks in it, so we don't
    want to copy it. We want to get references to it.
    cognifloyd committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    98f3add View commit details
    Browse the repository at this point in the history
  8. chore: lint fixes

    cognifloyd committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    8fc8717 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7c4f885 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2022

  1. Configuration menu
    Copy the full SHA
    6df6625 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22e073f View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2022

  1. Configuration menu
    Copy the full SHA
    3adeb9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b46d906 View commit details
    Browse the repository at this point in the history
  3. bugfix: typo in arg type

    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    9f5b86a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b383384 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    515aeb3 View commit details
    Browse the repository at this point in the history
  6. refactor(tests): fix WaitContainer test with more direct mock

    Instead of figuring out how to mock a podInformer resync
    (which the Informer was not designed to allow),
    we just call the HandlePodUpdate method and trust that the
    informer works with the API correctly (so no need to test that).
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    46921ee View commit details
    Browse the repository at this point in the history
  7. enhance(k8s): expose executor.max_log_size to kubernetes runtime

    The k8s runtime needs to cache the logs before the executor requests them.
    So, expose the maxLogSize so that the cached logs can be truncated near that size.
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    615b23f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a723fc8 View commit details
    Browse the repository at this point in the history
  9. enhance(k8s): add k8s Namespace and pod Name to podTracker

    this is needed for log streaming
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    e8f822a View commit details
    Browse the repository at this point in the history
  10. refactor(k8s): start streaming logs before steps start

    We need to make sure to capture all of the logs.
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    f374395 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7c49248 View commit details
    Browse the repository at this point in the history
  12. refactor(k8s): stream logs via Reader instead of Scanner

    This is how stern does it, and it lets us detect the end of the stream.
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    8c253f1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    0d66110 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b57a353 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b8d1683 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    42b554e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c82ddfc View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    78a8252 View commit details
    Browse the repository at this point in the history
  19. chore: lint fixes

    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    348fe3d View commit details
    Browse the repository at this point in the history
  20. bugfix: work around k8s fake client GetLogs bug

    bug in default ObjectReactor:
    github.com/kubernetes/client-go/issues/873
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    49b0163 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    2cc5696 View commit details
    Browse the repository at this point in the history
  22. tests: refactor k8s runtime AssembleBuild test to use subtests

    Also clean up test to call to call out
    what was an implicit use of podTracker and make
    its use make sense for the test.
    cognifloyd committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    5d26b47 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    4103334 View commit details
    Browse the repository at this point in the history