@@ -128,6 +128,13 @@ func Flags(opts *Options) []cli.Flag {
128128 Destination : & opts .ConfigSources ,
129129 Sources : cli .EnvVars ("RUNTIME_CONFIG_SOURCES" , "RUNTIME_CONFIG_SOURCE" ),
130130 },
131+ & cli.StringFlag {
132+ Name : "unconfigure-mode" ,
133+ Usage : "Specify how the runtime should be unconfigured; If 'none' is selected nothing will be reverted in the config [ all | default-runtime-only | none ]" ,
134+ Value : runtimeSpecificDefault ,
135+ Destination : & opts .UnconfigureMode ,
136+ Sources : cli .EnvVars ("RUNTIME_UNCONFIGURE_MODE" ),
137+ },
131138 }
132139
133140 flags = append (flags , containerd .Flags (& opts .containerdOptions )... )
@@ -178,6 +185,9 @@ func (opts *Options) Validate(logger logger.Interface, c *cli.Command, runtime s
178185 if opts .RestartMode == runtimeSpecificDefault {
179186 opts .RestartMode = containerd .DefaultRestartMode
180187 }
188+ if opts .UnconfigureMode == runtimeSpecificDefault {
189+ opts .UnconfigureMode = containerd .DefaultUnconfigureMode
190+ }
181191 case crio .Name :
182192 if opts .TopLevelConfigPath == runtimeSpecificDefault {
183193 opts .TopLevelConfigPath = crio .DefaultConfig
@@ -191,6 +201,9 @@ func (opts *Options) Validate(logger logger.Interface, c *cli.Command, runtime s
191201 if opts .RestartMode == runtimeSpecificDefault {
192202 opts .RestartMode = crio .DefaultRestartMode
193203 }
204+ if opts .UnconfigureMode == runtimeSpecificDefault {
205+ opts .UnconfigureMode = crio .DefaultUnconfigureMode
206+ }
194207 case docker .Name :
195208 if opts .TopLevelConfigPath == runtimeSpecificDefault {
196209 opts .TopLevelConfigPath = docker .DefaultConfig
@@ -205,6 +218,9 @@ func (opts *Options) Validate(logger logger.Interface, c *cli.Command, runtime s
205218 if opts .RestartMode == runtimeSpecificDefault {
206219 opts .RestartMode = docker .DefaultRestartMode
207220 }
221+ if opts .UnconfigureMode == runtimeSpecificDefault {
222+ opts .UnconfigureMode = docker .DefaultUnconfigureMode
223+ }
208224 default :
209225 return fmt .Errorf ("undefined runtime %v" , runtime )
210226 }
0 commit comments