Skip to content

feat(k8s): add previous flag to k8s_get_pod_logs - #79

Open
frodriguez-wasabi wants to merge 1 commit into
kagent-dev:mainfrom
frodriguez-wasabi:feat/k8s-get-pod-logs-previous
Open

feat(k8s): add previous flag to k8s_get_pod_logs#79
frodriguez-wasabi wants to merge 1 commit into
kagent-dev:mainfrom
frodriguez-wasabi:feat/k8s-get-pod-logs-previous

Conversation

@frodriguez-wasabi

Copy link
Copy Markdown

Description

  • Add an optional previous boolean to k8s_get_pod_logs and pass kubectl logs --previous when it is true.
  • This lets agents read the last terminated container after a restart (same as kubectl logs --previous). The current schema only supported pod_name, namespace, container, and tail_lines, so extra args were dropped.

Test plan

  • go test ./pkg/k8s -run TestHandleKubectlLogsEnhanced (includes previous-container argv assertion)
  • After merge/release, k8s_get_pod_logs with previous: true returns terminated-container logs when kubelet still has them

Pass kubectl logs --previous so agents can read the last terminated container after a restart.
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