Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
shimv2: get the kata configure file from env KATA_CONF_FILE
Browse files Browse the repository at this point in the history
If the env KATA_CONF_FILE was set, shimv2 will use it as the
kata configure file, otherwise, it will try to find it from
/etc and /usr/share directory.

Fixes: #1091

Signed-off-by: fupan <[email protected]>
  • Loading branch information
lifupan committed Jan 5, 2019
1 parent 8161b4c commit 0b28ab9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion containerd-shim-v2/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func New(ctx context.Context, id string, publisher events.Publisher) (cdshim.Shi
logrus.SetOutput(ioutil.Discard)
vci.SetLogger(ctx, logger)
katautils.SetLogger(ctx, logger, logger.Logger.Level)
_, runtimeConfig, err := katautils.LoadConfiguration("", false, true)

// Try to get the config file from the env KATA_CONF_FILE
confPath := os.Getenv("KATA_CONF_FILE")
_, runtimeConfig, err := katautils.LoadConfiguration(confPath, false, true)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0b28ab9

Please sign in to comment.