mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
proxy: do not decode proxy config
It is a well defined structure that needs no decoding. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
parent
22aedc4fb6
commit
c41c9de839
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/mitchellh/mapstructure"
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -132,9 +131,9 @@ func newProxyConfig(sandboxConfig *SandboxConfig) (ProxyConfig, error) {
|
|||||||
case KataProxyType:
|
case KataProxyType:
|
||||||
fallthrough
|
fallthrough
|
||||||
case CCProxyType:
|
case CCProxyType:
|
||||||
if err := mapstructure.Decode(sandboxConfig.ProxyConfig, &config); err != nil {
|
config = sandboxConfig.ProxyConfig
|
||||||
return ProxyConfig{}, err
|
default:
|
||||||
}
|
return ProxyConfig{}, fmt.Errorf("unknown proxy type %v", sandboxConfig.ProxyType)
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.Path == "" {
|
if config.Path == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user