mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 02:26:37 +00:00
shimv2: get the kata configure file from env KATA_CONF_FILE
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 <lifupan@gmail.com>
This commit is contained in:
parent
8161b4c1c1
commit
0b28ab9e57
@ -63,7 +63,10 @@ func New(ctx context.Context, id string, publisher events.Publisher) (cdshim.Shi
|
|||||||
logrus.SetOutput(ioutil.Discard)
|
logrus.SetOutput(ioutil.Discard)
|
||||||
vci.SetLogger(ctx, logger)
|
vci.SetLogger(ctx, logger)
|
||||||
katautils.SetLogger(ctx, logger, logger.Logger.Level)
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user