Merge pull request #636 from Random-Liu/fix-default-config
Only overwrite when legacy options are specified.
This commit is contained in:
commit
64b098a293
@ -204,8 +204,12 @@ func (c *CRIContainerdOptions) InitFlags(fs *pflag.FlagSet) error {
|
|||||||
}
|
}
|
||||||
// Add this for backward compatibility.
|
// Add this for backward compatibility.
|
||||||
// TODO(random-liu): Remove this when we no longer support cri-containerd standalone mode.
|
// TODO(random-liu): Remove this when we no longer support cri-containerd standalone mode.
|
||||||
|
if c.ContainerdConfig.RootDir != "" {
|
||||||
c.ContainerdRootDir = c.ContainerdConfig.RootDir
|
c.ContainerdRootDir = c.ContainerdConfig.RootDir
|
||||||
|
}
|
||||||
|
if c.ContainerdConfig.Endpoint != "" {
|
||||||
c.ContainerdEndpoint = c.ContainerdConfig.Endpoint
|
c.ContainerdEndpoint = c.ContainerdConfig.Endpoint
|
||||||
|
}
|
||||||
|
|
||||||
// What is the reason for applying the command line twice?
|
// What is the reason for applying the command line twice?
|
||||||
// Because the values from command line have the highest priority.
|
// Because the values from command line have the highest priority.
|
||||||
|
Loading…
Reference in New Issue
Block a user