(pod *corev1.Pod)
| 878 | } |
| 879 | |
| 880 | func containerNameToRef(pod *corev1.Pod) map[string]*corev1.Container { |
| 881 | names := map[string]*corev1.Container{} |
| 882 | for i := range pod.Spec.Containers { |
| 883 | ref := &pod.Spec.Containers[i] |
| 884 | names[ref.Name] = ref |
| 885 | } |
| 886 | for i := range pod.Spec.InitContainers { |
| 887 | ref := &pod.Spec.InitContainers[i] |
| 888 | names[ref.Name] = ref |
| 889 | } |
| 890 | for i := range pod.Spec.EphemeralContainers { |
| 891 | ref := (*corev1.Container)(&pod.Spec.EphemeralContainers[i].EphemeralContainerCommon) |
| 892 | names[ref.Name] = ref |
| 893 | } |
| 894 | return names |
| 895 | } |
| 896 | |
| 897 | // waitForContainer watches the given pod until the container is running |
| 898 | func (o *DebugOptions) waitForContainer(ctx context.Context, ns, podName, containerName string) (*corev1.Pod, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…