Merge pull request #1243 from vrothberg/RUN-1702

containers.conf: add events_container_create_inspect_data
This commit is contained in:
OpenShift Merge Robot 2022-11-28 07:44:29 -05:00 committed by GitHub
commit 23636dda9a
5 changed files with 17 additions and 0 deletions

View File

@ -446,6 +446,11 @@ use this command:
Valid values are: `file`, `journald`, and `none`. Valid values are: `file`, `journald`, and `none`.
**events_container_create_inspect_data**=true|false
Creates a more verbose container-create event which includes a JSON payload
with detailed information about the container. Set to false by default.
**helper_binaries_dir**=["/usr/libexec/podman", ...] **helper_binaries_dir**=["/usr/libexec/podman", ...]
A is a list of directories which are used to search for helper binaries. A is a list of directories which are used to search for helper binaries.

View File

@ -273,6 +273,11 @@ type EngineConfig struct {
// EventsLogger determines where events should be logged. // EventsLogger determines where events should be logged.
EventsLogger string `toml:"events_logger,omitempty"` EventsLogger string `toml:"events_logger,omitempty"`
// EventsContainerCreateInspectData creates a more verbose
// container-create event which includes a JSON payload with detailed
// information about the container.
EventsContainerCreateInspectData bool `toml:"events_container_create_inspect_data,omitempty"`
// graphRoot internal stores the location of the graphroot // graphRoot internal stores the location of the graphroot
graphRoot string graphRoot string

View File

@ -35,6 +35,7 @@ var _ = Describe("Config", func() {
gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo("")) gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo(""))
gomega.Expect(defaultConfig.Engine.ImageVolumeMode).To(gomega.BeEquivalentTo("bind")) gomega.Expect(defaultConfig.Engine.ImageVolumeMode).To(gomega.BeEquivalentTo("bind"))
gomega.Expect(defaultConfig.Engine.SSHConfig).To(gomega.ContainSubstring("/.ssh/config")) gomega.Expect(defaultConfig.Engine.SSHConfig).To(gomega.ContainSubstring("/.ssh/config"))
gomega.Expect(defaultConfig.Engine.EventsContainerCreateInspectData).To(gomega.BeFalse())
path, err := defaultConfig.ImageCopyTmpDir() path, err := defaultConfig.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil()) gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp")) gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp"))
@ -446,6 +447,7 @@ image_copy_tmp_dir="storage"`
gomega.Expect(config.Engine.PlatformToOCIRuntime).To(gomega.Equal(PlatformToOCIRuntimeMap)) gomega.Expect(config.Engine.PlatformToOCIRuntime).To(gomega.Equal(PlatformToOCIRuntimeMap))
gomega.Expect(config.Engine.ImageDefaultFormat).To(gomega.Equal("v2s2")) gomega.Expect(config.Engine.ImageDefaultFormat).To(gomega.Equal("v2s2"))
gomega.Expect(config.Engine.EventsLogFilePath).To(gomega.BeEquivalentTo("/tmp/events.log")) gomega.Expect(config.Engine.EventsLogFilePath).To(gomega.BeEquivalentTo("/tmp/events.log"))
gomega.Expect(config.Engine.EventsContainerCreateInspectData).To(gomega.BeTrue())
path, err := config.ImageCopyTmpDir() path, err := config.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil()) gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/tmp/foobar")) gomega.Expect(path).To(gomega.BeEquivalentTo("/tmp/foobar"))

View File

@ -410,6 +410,10 @@ default_sysctls = [
# #
#events_logger = "journald" #events_logger = "journald"
# Creates a more verbose container-create event which includes a JSON payload
# with detailed information about the container.
#events_container_create_inspect_data = false
# A is a list of directories which are used to search for helper binaries. # A is a list of directories which are used to search for helper binaries.
# #
#helper_binaries_dir = [ #helper_binaries_dir = [

View File

@ -11,6 +11,7 @@ image_default_format="v2s2"
image_copy_tmp_dir="/tmp/foobar" image_copy_tmp_dir="/tmp/foobar"
events_logfile_path = "/tmp/events.log" events_logfile_path = "/tmp/events.log"
events_logfile_max_size="500" events_logfile_max_size="500"
events_container_create_inspect_data = true
pod_exit_policy="stop" pod_exit_policy="stop"
[engine.platform_to_oci_runtime] [engine.platform_to_oci_runtime]