From 500e85b315ae8c6dbac0ec16982aa78acaa03b9f Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 20 Jun 2023 23:32:50 +0200 Subject: [PATCH] config: add CompressionLevel to containers.conf Signed-off-by: Giuseppe Scrivano --- pkg/config/config.go | 3 +++ pkg/config/config_test.go | 1 + 2 files changed, 4 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 3ed71f662..a408b4fd4 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -510,6 +510,9 @@ type EngineConfig struct { // CompressionFormat is the compression format used to compress image layers. CompressionFormat string `toml:"compression_format,omitempty"` + + // CompressionLevel is the compression level used to compress image layers. + CompressionLevel *int `toml:"compression_level,omitempty"` } // SetOptions contains a subset of options in a Config. It's used to indicate if diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 612609283..2c0f2fb19 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -34,6 +34,7 @@ var _ = Describe("Config", func() { gomega.Expect(defaultConfig.Containers.ReadOnly).To(gomega.BeFalse()) gomega.Expect(defaultConfig.Engine.ServiceTimeout).To(gomega.BeEquivalentTo(5)) gomega.Expect(defaultConfig.Engine.CompressionFormat).To(gomega.BeEquivalentTo("gzip")) + gomega.Expect(defaultConfig.Engine.CompressionLevel).To(gomega.BeNil()) gomega.Expect(defaultConfig.NetNS()).To(gomega.BeEquivalentTo("private")) gomega.Expect(defaultConfig.IPCNS()).To(gomega.BeEquivalentTo("shareable")) gomega.Expect(defaultConfig.Engine.InfraImage).To(gomega.BeEquivalentTo(""))