Skip to content

Commit 008bde0

Browse files
committed
framework: Watch logs from init containers
Signed-off-by: Lennart Jern <[email protected]>
1 parent 724c590 commit 008bde0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/deployment_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (eh *watchPodLogsEventHandler) streamPodLogs(pod *corev1.Pod) {
251251
return
252252
}
253253

254-
for _, container := range pod.Spec.Containers {
254+
for _, container := range append(pod.Spec.Containers, pod.Spec.InitContainers...) {
255255
log.Logf("Creating log watcher for controller %s, pod %s, container %s", klog.KRef(eh.input.Namespace, eh.input.ManagingResourceName), pod.Name, container.Name)
256256

257257
// Create log metadata file.

0 commit comments

Comments
 (0)