From d7a3d930240b5de43ae7e8356c812f48c0f9186e Mon Sep 17 00:00:00 2001 From: Christopher Desiniotis Date: Mon, 4 Dec 2023 15:27:35 -0800 Subject: [PATCH] Implement Set() for the crio implementation of engine.Interface Signed-off-by: Christopher Desiniotis --- pkg/config/engine/crio/crio.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/config/engine/crio/crio.go b/pkg/config/engine/crio/crio.go index 1bbec60e..46ef72b7 100644 --- a/pkg/config/engine/crio/crio.go +++ b/pkg/config/engine/crio/crio.go @@ -101,8 +101,12 @@ func (c *Config) RemoveRuntime(name string) error { return nil } -// Set is not supported for cri-o configs. -func (c *Config) Set(key string, value interface{}) {} +// Set sets the specified cri-o option. +func (c *Config) Set(key string, value interface{}) { + config := (toml.Tree)(*c) + config.Set(key, value) + *c = (Config)(config) +} // Save writes the config to the specified path func (c Config) Save(path string) (int64, error) {