Skip to content

Commit

Permalink
Change infra_image default to ""
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Jan 27, 2022
1 parent 2c6d182 commit 8a61ead
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
9 changes: 7 additions & 2 deletions docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,14 @@ Not setting this field will fall back to containers/image defaults. (6)

**infra_command**="/pause"

Command to run the infra container.
Infra (pause) container image name for pod infra containers. When running a
pod, we start a `pause` process in a container to hold open the namespaces
associated with the pod. This container does nothing other then sleep,
reserving the pods resources for the lifetime of the pod. By default container
engines run a buildit container pause. If you want override specify an image
to pull.

**infra_image**="k8s.gcr.io/pause:3.4.1"
**infra_image**=""

Infra (pause) container image name for pod infra containers. When running a
pod, we start a `pause` process in a container to hold open the namespaces
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var _ = Describe("Config", func() {
gomega.Expect(defaultConfig.Containers.PidsLimit).To(gomega.BeEquivalentTo(2048))
gomega.Expect(defaultConfig.Engine.ServiceTimeout).To(gomega.BeEquivalentTo(5))
gomega.Expect(defaultConfig.NetNS()).To(gomega.BeEquivalentTo("private"))
gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo(""))
path, err := defaultConfig.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp"))
Expand Down Expand Up @@ -221,6 +222,7 @@ image_copy_tmp_dir="storage"`
gomega.Expect(defaultConfig.Engine.NetworkCmdOptions).To(gomega.BeEquivalentTo(networkCmdOptions))
gomega.Expect(defaultConfig.Engine.HelperBinariesDir).To(gomega.Equal(helperDirs))
gomega.Expect(defaultConfig.Engine.ServiceTimeout).To(gomega.BeEquivalentTo(300))
gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo("k8s.gcr.io/pause:3.4.1"))
})

It("test GetDefaultEnvEx", func() {
Expand Down
6 changes: 4 additions & 2 deletions pkg/config/containers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,11 @@ default_sysctls = [
# Infra (pause) container image name for pod infra containers. When running a
# pod, we start a `pause` process in a container to hold open the namespaces
# associated with the pod. This container does nothing other then sleep,
# reserving the pods resources for the lifetime of the pod.
# reserving the pods resources for the lifetime of the pod. By default container
# engines run a buildit container pause. If you want override specify an image
# to pull.
#
#infra_image = "k8s.gcr.io/pause:3.4.1"
#infra_image = ""

# Specify the locking mechanism to use; valid values are "shm" and "file".
# Change the default only if you are sure of what you are doing, in general
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var (
// DefaultInitPath is the default path to the container-init binary
DefaultInitPath = "/usr/libexec/podman/catatonit"
// DefaultInfraImage to use for infra container
DefaultInfraImage = "k8s.gcr.io/pause:3.5"
DefaultInfraImage = ""
// DefaultRootlessSHMLockPath is the default path for rootless SHM locks
DefaultRootlessSHMLockPath = "/libpod_rootless_lock"
// DefaultDetachKeys is the default keys sequence for detaching a
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/testdata/containers_comment.conf
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
#namespace = ""

# Default infra (pause) image name for pod infra containers
# infra_image = "k8s.gcr.io/pause:3.4.1"
# infra_image = ""

# Default command to run the infra container
# infra_command = "/pause"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/testdata/containers_invalid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ no_pivot_root = false
#namespace = ""

# Default infra (pause) image name for pod infra containers
infra_image = "k8s.gcr.io/pause:3.4.1"
infra_image = ""

# Default command to run the infra container
infra_command = "/pause"
Expand Down

0 comments on commit 8a61ead

Please sign in to comment.