func (config *NetworkingTestConfig) createTestPods() { testContainerPod := config.createTestPodSpec() hostTestContainerPod := framework.NewHostExecPodSpec(config.Namespace, hostTestPodName) config.createPod(testContainerPod) config.createPod(hostTestContainerPod) framework.ExpectNoError(config.f.WaitForPodRunning(testContainerPod.Name)) framework.ExpectNoError(config.f.WaitForPodRunning(hostTestContainerPod.Name)) var err error config.TestContainerPod, err = config.getPodClient().Get(testContainerPod.Name) if err != nil { framework.Failf("Failed to retrieve %s pod: %v", testContainerPod.Name, err) } config.HostTestContainerPod, err = config.getPodClient().Get(hostTestContainerPod.Name) if err != nil { framework.Failf("Failed to retrieve %s pod: %v", hostTestContainerPod.Name, err) } }
func (config *PrivilegedPodTestConfig) createHostExecPod() { podSpec := framework.NewHostExecPodSpec(config.f.Namespace.Name, "hostexec") config.hostExecPod = config.f.PodClient().CreateSync(podSpec) }