diff options
author | Andrei Natanael Cosma <andrei@intersect.ro> | 2022-10-02 19:08:17 +0200 |
---|---|---|
committer | Andrei Natanael Cosma <andrei@intersect.ro> | 2022-10-04 21:59:57 +0200 |
commit | f250560a8043f25771f8ba41b2faf585829b0c9b (patch) | |
tree | 4876bc718d78438d561bf08a7dcb2dfcf5c33928 /test | |
parent | 0330d1abed7559e33baf50167a161e8ec54363b3 (diff) | |
download | podman-f250560a8043f25771f8ba41b2faf585829b0c9b.tar.gz podman-f250560a8043f25771f8ba41b2faf585829b0c9b.tar.bz2 podman-f250560a8043f25771f8ba41b2faf585829b0c9b.zip |
Add pods created by kube play to a default network
In order to allow pods to reach other pods (as in Kubernetes) they all
need to be added to the same network. A network is created (if it
doesn't exist) and pods created by play-kube are added to that network.
When network options are passed to kube command the pods are not
attached to the default kube network.
Signed-off-by: Andrei Natanael Cosma <andrei@intersect.ro>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/play_kube_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 651cb1074..8b9e43f65 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -3000,6 +3000,21 @@ MemoryReservation: {{ .HostConfig.MemoryReservation }}`}) Expect(logs.OutputToString()).To(Equal(netns)) }) + It("podman play kube test with kube default network", func() { + pod := getPod() + err := generateKubeYaml("pod", pod, kubeYaml) + Expect(err).To(BeNil()) + + kube := podmanTest.Podman([]string{"play", "kube", kubeYaml}) + kube.WaitWithDefaultTimeout() + Expect(kube).Should(Exit(0)) + + inspect := podmanTest.Podman([]string{"inspect", pod.Name, "--format", "{{ .InfraConfig.Networks }}"}) + inspect.WaitWithDefaultTimeout() + Expect(inspect).Should(Exit(0)) + Expect(inspect.OutputToString()).To(Equal("[podman-default-kube-network]")) + }) + It("podman play kube persistentVolumeClaim", func() { volName := "myvol" volDevice := "tmpfs" |