Add -T flag to optionally include CRI timestamps in logs
Summary
This MR adds a new -T flag to kubeSOS that allows users to opt-in to including CRI (Container Runtime Interface) timestamps in log output.
Changes
-
Default behavior: Logs are captured without
--timestampsflag, producing clean output that doesn't break JSON parsing -
With
-Tflag: Logs include CRI timestamp prefixes (original behavior) for debugging purposes - Updated README.md to document the new flag
Problem Solved
Kubernetes container runtimes (containerd/Docker) write logs in CRI format with RFC3339Nano timestamp prefixes:
2025-11-05T00:40:00.149897031+07:00 {"component": "gitlab","subcomponent":"application_json",...}
This breaks JSON parsing for applications that output structured logs. By removing the --timestamps flag by default, we get clean JSON output that can be parsed properly.
Related Issue
Closes #33
Edited by Adam Mulvany