Skip to content

Conversation

@jfzunigac
Copy link
Contributor

Summary

Problem (Why)

The current pod log directory cleanup behavior is relies on creating dot files for external cleanup processes. This PR introduces a new configuration option to enable direct automatic cleanup of pod log directories when pods are deleted.

Solution (What + How)

  • Added a new optional boolean configuration enablePodLogDirectoryCleanup to the KubeConfig Thrift struct and corresponding config parsing.
  • Updated LogStreamManager to conditionally delete pod log directories directly if the new config is enabled, otherwise fallback to creating a tombstone file.
  • Added new metric to track pod directory deletions.

Test Plan

  • Added testPodDirectoryDeletion unit test to verify pod directory is deleted directly and no dot file is created when the new config is enabled.

@jfzunigac jfzunigac requested a review from a team as a code owner November 18, 2025 22:53
@jfzunigac jfzunigac merged commit 3f8f27a into pinterest:master Nov 19, 2025
1 check passed
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.

2 participants