Skip to content

Commit

Permalink
Merge pull request #1243 from vrothberg/RUN-1702
Browse files Browse the repository at this point in the history
containers.conf: add events_container_create_inspect_data
  • Loading branch information
openshift-merge-robot authored Nov 28, 2022
2 parents db0d935 + fbb0de7 commit 24d7820
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ use this command:

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", ...]

A is a list of directories which are used to search for helper binaries.
Expand Down
5 changes: 5 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ type EngineConfig struct {
// EventsLogger determines where events should be logged.
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 string

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 @@ -35,6 +35,7 @@ var _ = Describe("Config", func() {
gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo(""))
gomega.Expect(defaultConfig.Engine.ImageVolumeMode).To(gomega.BeEquivalentTo("bind"))
gomega.Expect(defaultConfig.Engine.SSHConfig).To(gomega.ContainSubstring("/.ssh/config"))
gomega.Expect(defaultConfig.Engine.EventsContainerCreateInspectData).To(gomega.BeFalse())
path, err := defaultConfig.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp"))
Expand Down Expand Up @@ -446,6 +447,7 @@ image_copy_tmp_dir="storage"`
gomega.Expect(config.Engine.PlatformToOCIRuntime).To(gomega.Equal(PlatformToOCIRuntimeMap))
gomega.Expect(config.Engine.ImageDefaultFormat).To(gomega.Equal("v2s2"))
gomega.Expect(config.Engine.EventsLogFilePath).To(gomega.BeEquivalentTo("/tmp/events.log"))
gomega.Expect(config.Engine.EventsContainerCreateInspectData).To(gomega.BeTrue())
path, err := config.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/tmp/foobar"))
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/containers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ default_sysctls = [
#
#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.
#
#helper_binaries_dir = [
Expand Down
1 change: 1 addition & 0 deletions pkg/config/testdata/containers_override.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ image_default_format="v2s2"
image_copy_tmp_dir="/tmp/foobar"
events_logfile_path = "/tmp/events.log"
events_logfile_max_size="500"
events_container_create_inspect_data = true
pod_exit_policy="stop"

[engine.platform_to_oci_runtime]
Expand Down

0 comments on commit 24d7820

Please sign in to comment.