Skip to content

Commit

Permalink
specify container name "main" to account for sidecar containers (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Stehler authored Jan 13, 2022
1 parent fb6277c commit b71d0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/flinkcluster_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ func getPodLogs(clientset *kubernetes.Clientset, pod *corev1.Pod) (string, error
}
pods := clientset.CoreV1().Pods(pod.Namespace)

req := pods.GetLogs(pod.Name, &corev1.PodLogOptions{})
req := pods.GetLogs(pod.Name, &corev1.PodLogOptions{Container: "main"})
podLogs, err := req.Stream(context.TODO())
if err != nil {
return "", fmt.Errorf("failed to get logs for pod %s: %v", pod.Name, err)
Expand Down

0 comments on commit b71d0dc

Please sign in to comment.