From 738be3cfac70e21bc17a877d3bcb41533bf5d94d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 26 Sep 2024 21:08:15 +0200 Subject: [PATCH] config: pass down PullOptions from the storage configuration maintain the PullOptions as read from the storage.conf file, so that we don't lose options like `convert_images` that are necessary to convert existing images to a format usable with composefs. Do not bother to expose this configuration in the crio drop-in configuration as the PullOptions API is still experimental in containers/storage. Signed-off-by: Giuseppe Scrivano --- pkg/config/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 2e87dd1f726c..a82ab29ce529 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -153,6 +153,9 @@ type RootConfig struct { // StorageOption is a list of storage driver specific options. StorageOptions []string `toml:"storage_option"` + // PullOptions is a map of pull options that are passed to the storage driver. + pullOptions map[string]string + // LogDir is the default log directory where all logs will go unless kubelet // tells us to put them somewhere else. LogDir string `toml:"log_dir"` @@ -186,6 +189,7 @@ func (c *RootConfig) GetStore() (storage.Store, error) { ImageStore: c.ImageStore, GraphDriverName: c.Storage, GraphDriverOptions: c.StorageOptions, + PullOptions: c.pullOptions, }) } @@ -863,6 +867,7 @@ func DefaultConfig() (*Config, error) { ImageStore: storeOpts.ImageStore, Storage: storeOpts.GraphDriverName, StorageOptions: storeOpts.GraphDriverOptions, + pullOptions: storeOpts.PullOptions, LogDir: "/var/log/crio/pods", VersionFile: CrioVersionPathTmp, CleanShutdownFile: CrioCleanShutdownFile, @@ -1059,6 +1064,7 @@ func (c *RootConfig) Validate(onExecution bool) error { c.Root = store.GraphRoot() c.Storage = store.GraphDriverName() c.StorageOptions = store.GraphOptions() + c.pullOptions = store.PullOptions() } return nil