From 9c8fb5cc0c0eb17adac1c2ddb43e23cd723c718b Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 22 Nov 2021 11:50:08 -0600 Subject: Rename pod on generate of container When generating kube of a container, the podname and container name in the yaml are identical. This offends rules in podman where pods and containers cannot have the same name. We now append _pod to the podname to avoid that collision. Signed-off-by: Brent Baude --- test/e2e/generate_kube_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'test/e2e') diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go index cd382eba9..d95555068 100644 --- a/test/e2e/generate_kube_test.go +++ b/test/e2e/generate_kube_test.go @@ -71,6 +71,7 @@ var _ = Describe("Podman generate kube", func() { Expect(pod.Spec.DNSConfig).To(BeNil()) Expect(pod.Spec.Containers[0].WorkingDir).To(Equal("")) Expect(pod.Spec.Containers[0].Env).To(BeNil()) + Expect(pod.Name).To(Equal("top_pod")) numContainers := 0 for range pod.Spec.Containers { -- cgit v1.2.3-54-g00ecf