summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-08-17 10:36:51 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-23 18:16:28 +0000
commit2a7449362f2884d9ae6a783c0ce38979d882e2cf (patch)
tree6e7b8ab33505d210201e62faba6a50f98c0a4ea7 /libpod/options.go
parent697b46430a8a7c2c7231078911dcec51f0c6fab5 (diff)
downloadpodman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.gz
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.bz2
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.zip
Change pause container to infra container
Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1187 Approved by: mheon
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/libpod/options.go b/libpod/options.go
index c5e32d20e..b8f66db5c 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -304,32 +304,32 @@ func WithNamespace(ns string) RuntimeOption {
}
}
-// WithDefaultPauseImage sets the pause image for libpod.
-// A pause image is used for inter-container kernel
-// namespace sharing within a pod. Typically, a pause
+// WithDefaultInfraImage sets the infra image for libpod.
+// An infra image is used for inter-container kernel
+// namespace sharing within a pod. Typically, an infra
// container is lightweight and is there to reap
// zombie processes within its pid namespace.
-func WithDefaultPauseImage(img string) RuntimeOption {
+func WithDefaultInfraImage(img string) RuntimeOption {
return func(rt *Runtime) error {
if rt.valid {
return ErrRuntimeFinalized
}
- rt.config.PauseImage = img
+ rt.config.InfraImage = img
return nil
}
}
-// WithDefaultPauseCommand sets the command to
+// WithDefaultInfraCommand sets the command to
// run on pause container start up.
-func WithDefaultPauseCommand(cmd string) RuntimeOption {
+func WithDefaultInfraCommand(cmd string) RuntimeOption {
return func(rt *Runtime) error {
if rt.valid {
return ErrRuntimeFinalized
}
- rt.config.PauseCommand = cmd
+ rt.config.InfraCommand = cmd
return nil
}
@@ -1156,15 +1156,15 @@ func WithCtrNamespace(ns string) CtrCreateOption {
}
}
-// withIsPause sets the container to be a pause container. This means the container will be sometimes hidden
+// withIsInfra sets the container to be an infra container. This means the container will be sometimes hidden
// and expected to be the first container in the pod.
-func withIsPause() CtrCreateOption {
+func withIsInfra() CtrCreateOption {
return func(ctr *Container) error {
if ctr.valid {
return ErrCtrFinalized
}
- ctr.config.IsPause = true
+ ctr.config.IsInfra = true
return nil
}
@@ -1348,14 +1348,14 @@ func WithPodUTS() PodCreateOption {
}
}
-// WithPauseContainer tells the pod to create a pause container
-func WithPauseContainer() PodCreateOption {
+// WithInfraContainer tells the pod to create a pause container
+func WithInfraContainer() PodCreateOption {
return func(pod *Pod) error {
if pod.valid {
return ErrPodFinalized
}
- pod.config.PauseContainer.HasPauseContainer = true
+ pod.config.InfraContainer.HasInfraContainer = true
return nil
}