summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-11-09 14:43:55 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-11-09 15:32:36 +0100
commitfaf450ea18179bb0e4ae1213d3ca6c126b04b452 (patch)
tree67f72a91fc4191a6155e1e51500fe44483c463e4 /vendor
parent3ccd999340462a5af62ac145c339d9c251721aec (diff)
downloadpodman-faf450ea18179bb0e4ae1213d3ca6c126b04b452.tar.gz
podman-faf450ea18179bb0e4ae1213d3ca6c126b04b452.tar.bz2
podman-faf450ea18179bb0e4ae1213d3ca6c126b04b452.zip
support health checks from image configs
Health checks may be defined in the container config or the config of an image. So far, Podman only looked at the container config. The plumbing happened in libimage but add a regression test to Podman as well to make sure the glue code will not regress. Note that I am pinning github.com/onsi/gomega to v1.16.0 since v1.17.0 requires go 1.16 which in turn is breaking CI. Fixes: #12226 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/common/libimage/inspect.go5
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go5
-rw-r--r--vendor/modules.txt4
3 files changed, 10 insertions, 4 deletions
diff --git a/vendor/github.com/containers/common/libimage/inspect.go b/vendor/github.com/containers/common/libimage/inspect.go
index 007cbdd89..d44ebf46e 100644
--- a/vendor/github.com/containers/common/libimage/inspect.go
+++ b/vendor/github.com/containers/common/libimage/inspect.go
@@ -187,7 +187,12 @@ func (i *Image) Inspect(ctx context.Context, options *InspectOptions) (*ImageDat
return nil, err
}
data.Comment = dockerManifest.Comment
+ // NOTE: Health checks may be listed in the container config or
+ // the config.
data.HealthCheck = dockerManifest.ContainerConfig.Healthcheck
+ if data.HealthCheck == nil {
+ data.HealthCheck = dockerManifest.Config.Healthcheck
+ }
}
if data.Annotations == nil {
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index 45230703d..3d7101399 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -1151,10 +1151,11 @@ func (c *Config) FindHelperBinary(name string, searchPATH bool) (string, error)
if searchPATH {
return exec.LookPath(name)
}
+ configHint := "To resolve this error, set the helper_binaries_dir key in the `[engine]` section of containers.conf to the directory containing your helper binaries."
if len(c.Engine.HelperBinariesDir) == 0 {
- return "", errors.Errorf("could not find %q because there are no helper binary directories configured", name)
+ return "", errors.Errorf("could not find %q because there are no helper binary directories configured. %s", name, configHint)
}
- return "", errors.Errorf("could not find %q in one of %v", name, c.Engine.HelperBinariesDir)
+ return "", errors.Errorf("could not find %q in one of %v. %s", name, c.Engine.HelperBinariesDir, configHint)
}
// ImageCopyTmpDir default directory to store tempory image files during copy
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 10fb28eef..b9046c680 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -97,7 +97,7 @@ github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/sshagent
github.com/containers/buildah/pkg/util
github.com/containers/buildah/util
-# github.com/containers/common v0.46.1-0.20211026130826-7abfd453c86f
+# github.com/containers/common v0.46.1-0.20211109131927-c342e496bf76
github.com/containers/common/libimage
github.com/containers/common/libimage/manifests
github.com/containers/common/pkg/apparmor
@@ -491,7 +491,7 @@ github.com/onsi/ginkgo/reporters/stenographer
github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable
github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty
github.com/onsi/ginkgo/types
-# github.com/onsi/gomega v1.16.0
+# github.com/onsi/gomega v1.17.0 => github.com/onsi/gomega v1.16.0
github.com/onsi/gomega
github.com/onsi/gomega/format
github.com/onsi/gomega/gbytes