Skip to content

Commit

Permalink
add friendly comment
Browse files Browse the repository at this point in the history
Signed-off-by: karta0807913 <[email protected]>
  • Loading branch information
karta0807913 committed Dec 1, 2022
1 parent 1d84f0a commit d19e152
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 0 additions & 12 deletions test/e2e/config/containers-cgroup.conf

This file was deleted.

14 changes: 12 additions & 2 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4388,8 +4388,18 @@ ENV OPENJ9_JAVA_OPTIONS=%q
})

It("podman play kube with disabled cgroup", func() {
os.Setenv("CONTAINERS_CONF", "config/containers-cgroup.conf")
err := writeYaml(simplePodYaml, kubeYaml)
conffile := filepath.Join(podmanTest.TempDir, "container.conf")
// Disabled ipcns and cgroupfs in the config file
// Since shmsize (Inherit from infra container) cannot be set if ipcns is "host", we should remove the default value.
// Also, cgroupfs config should be loaded into SpecGenerator when playing kube.
err := os.WriteFile(conffile, []byte(`
[containers]
ipcns="host"
cgroups="disabled"`), 0644)
Expect(err).ToNot(HaveOccurred())
defer os.Unsetenv("CONTAINERS_CONF")
os.Setenv("CONTAINERS_CONF", conffile)
err = writeYaml(simplePodYaml, kubeYaml)
Expect(err).To(BeNil())

kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
Expand Down

0 comments on commit d19e152

Please sign in to comment.