summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-10 13:44:47 -0400
committerGitHub <noreply@github.com>2021-09-10 13:44:47 -0400
commit5e9758fd5f75d8e2be88c9a4b929cbbfd301fb70 (patch)
treed6d7eb5980534edf68c731731985684a90a5438e /libpod/container.go
parente6046224ea88cad9286303456562b4a24ad9cf9b (diff)
parentf5e4ffb5e46be03a81b4425d3fe080543fca7035 (diff)
downloadpodman-5e9758fd5f75d8e2be88c9a4b929cbbfd301fb70.tar.gz
podman-5e9758fd5f75d8e2be88c9a4b929cbbfd301fb70.tar.bz2
podman-5e9758fd5f75d8e2be88c9a4b929cbbfd301fb70.zip
Merge pull request #11323 from umohnani8/init
Add init containers to generate and play kube
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 0986a0d80..a4bbb5dd0 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -1062,6 +1062,11 @@ func (c *Container) IsInfra() bool {
return c.config.IsInfra
}
+// IsInitCtr returns whether the container is an init container
+func (c *Container) IsInitCtr() bool {
+ return len(c.config.InitContainerType) > 0
+}
+
// IsReadOnly returns whether the container is running in read only mode
func (c *Container) IsReadOnly() bool {
return c.config.Spec.Root.Readonly