File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ func init() {
6767 return nil
6868 }
6969 conf := c .(map [string ]interface {})
70+ migrateConfig (conf )
7071 plugins ["io.containerd.internal.v1.cri" ] = conf
7172 return nil
7273 },
@@ -175,3 +176,22 @@ func setGLogLevel() error {
175176 }
176177 return nil
177178}
179+
180+ func migrateConfig (conf map [string ]interface {}) {
181+ containerdConf , ok := conf ["containerd" ]
182+ if ! ok {
183+ return
184+ }
185+ runtimesConf , ok := containerdConf .(map [string ]interface {})["runtimes" ]
186+ if ! ok {
187+ return
188+ }
189+ for _ , v := range runtimesConf .(map [string ]interface {}) {
190+ runtimeConf := v .(map [string ]interface {})
191+ if sandboxMode , ok := runtimeConf ["sandbox_mode" ]; ok {
192+ if _ , ok := runtimeConf ["sandboxer" ]; ! ok {
193+ runtimeConf ["sandboxer" ] = sandboxMode
194+ }
195+ }
196+ }
197+ }
You can’t perform that action at this time.
0 commit comments