diff --git a/test/e2e/framework/ingress/ingress_utils.go b/test/e2e/framework/ingress/ingress_utils.go index 6220a3416be..9684aa8a6cd 100644 --- a/test/e2e/framework/ingress/ingress_utils.go +++ b/test/e2e/framework/ingress/ingress_utils.go @@ -400,7 +400,6 @@ func createTLSSecret(kubeClient clientset.Interface, namespace, secretName strin } var s *v1.Secret if s, err = kubeClient.CoreV1().Secrets(namespace).Get(context.TODO(), secretName, metav1.GetOptions{}); err == nil { - // TODO: Retry the update. We don't really expect anything to conflict though. framework.Logf("Updating secret %v in ns %v with hosts %v", secret.Name, namespace, host) s.Data = secret.Data _, err = kubeClient.CoreV1().Secrets(namespace).Update(context.TODO(), s, metav1.UpdateOptions{}) diff --git a/test/e2e/framework/podlogs/podlogs.go b/test/e2e/framework/podlogs/podlogs.go index 1485fd26158..59c0f557586 100644 --- a/test/e2e/framework/podlogs/podlogs.go +++ b/test/e2e/framework/podlogs/podlogs.go @@ -41,15 +41,6 @@ import ( clientset "k8s.io/client-go/kubernetes" ) -// LogsForPod starts reading the logs for a certain pod. If the pod has more than one -// container, opts.Container must be set. Reading stops when the context is done. -// The stream includes formatted error messages and ends with -// rpc error: code = Unknown desc = Error: No such container: 41a... -// when the pod gets deleted while streaming. -func LogsForPod(ctx context.Context, cs clientset.Interface, ns, pod string, opts *v1.PodLogOptions) (io.ReadCloser, error) { - return cs.CoreV1().Pods(ns).GetLogs(pod, opts).Stream(ctx) -} - // LogOutput determines where output from CopyAllLogs goes. type LogOutput struct { // If not nil, errors will be logged here. @@ -110,7 +101,7 @@ func CopyAllLogs(ctx context.Context, cs clientset.Interface, ns string, to LogO pod.Status.ContainerStatuses[i].State.Terminated == nil) { continue } - readCloser, err := LogsForPod(ctx, cs, ns, pod.ObjectMeta.Name, + readCloser, err := logsForPod(ctx, cs, ns, pod.ObjectMeta.Name, &v1.PodLogOptions{ Container: c.Name, Follow: true, @@ -210,6 +201,15 @@ func CopyAllLogs(ctx context.Context, cs clientset.Interface, ns string, to LogO return nil } +// logsForPod starts reading the logs for a certain pod. If the pod has more than one +// container, opts.Container must be set. Reading stops when the context is done. +// The stream includes formatted error messages and ends with +// rpc error: code = Unknown desc = Error: No such container: 41a... +// when the pod gets deleted while streaming. +func logsForPod(ctx context.Context, cs clientset.Interface, ns, pod string, opts *v1.PodLogOptions) (io.ReadCloser, error) { + return cs.CoreV1().Pods(ns).GetLogs(pod, opts).Stream(ctx) +} + // WatchPods prints pod status events for a certain namespace or all namespaces // when namespace name is empty. func WatchPods(ctx context.Context, cs clientset.Interface, ns string, to io.Writer) error {