Skip to content

Commit

Permalink
containers.conf: add field for AddCompression to Engine table
Browse files Browse the repository at this point in the history
Allows users to set default value of `AddCompression` to Engine table so
users can use containers/buildah#4912 by
default.

Closes: containers/buildah#4912 (comment)

Signed-off-by: Aditya R <[email protected]>
  • Loading branch information
flouthoc committed Aug 2, 2023
1 parent cac4013 commit 216bf7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ The `engine` table contains configuration options used to set up container engin

Name of destination for accessing the Podman service. See SERVICE DESTINATION TABLE below.

**add-compression**=[]

List of compression algorithms. If set makes sure that requested compression variant
for each platform is added to the manifest list keeping original instance intact in
the same manifest list on every `manifest push`. Supported values are (`gzip`, `zstd` and `zstd:chunked`)

**cgroup_manager**="systemd"

The cgroup management implementation used for the runtime. Supports `cgroupfs`
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ type EngineConfig struct {
// ActiveService index to Destinations added v2.0.3
ActiveService string `toml:"active_service,omitempty"`

// Add existing instances with requested compression algorithms to manifest list
AddCompression []string `toml:"add_compression,omitempty"`

// ServiceDestinations mapped by service Names
ServiceDestinations map[string]Destination `toml:"service_destinations,omitempty"`

Expand Down
1 change: 1 addition & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var _ = Describe("Config", func() {
gomega.Expect(defaultConfig.Engine.EventsContainerCreateInspectData).To(gomega.BeFalse())
gomega.Expect(defaultConfig.Engine.DBBackend).To(gomega.BeEquivalentTo(stringBoltDB))
gomega.Expect(defaultConfig.Engine.PodmanshTimeout).To(gomega.BeEquivalentTo(30))
gomega.Expect(defaultConfig.Engine.AddCompression).To(gomega.BeEquivalentTo([]string{}))

dbBackend, err := defaultConfig.DBBackend()
gomega.Expect(dbBackend).To(gomega.BeEquivalentTo(DBBackendBoltDB))
Expand Down

0 comments on commit 216bf7b

Please sign in to comment.