Only set default rootless image if it is not already customized

Only change the image to the default rootless image when using the
--rootless option if the image has not already customized with the
--image option.

Fix #938

Signed-off-by: Doug Borg <dougborg@apple.com>
This commit is contained in:
Doug Borg 2022-04-11 16:39:41 -06:00
parent b8bcf1d810
commit 79de2c5d82

View File

@ -108,7 +108,9 @@ func (f *factory) New(ctx context.Context, cfg driver.InitConfig) (driver.Driver
if err != nil {
return nil, err
}
deploymentOpt.Image = bkimage.DefaultRootlessImage
if _, isImage := cfg.DriverOpts["image"]; !isImage {
deploymentOpt.Image = bkimage.DefaultRootlessImage
}
case "nodeselector":
kvs := strings.Split(strings.Trim(v, `"`), ",")
s := map[string]string{}