Rename config file const
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>pull/5447/head
parent
630dba3af1
commit
baf0ba31ab
|
@ -31,7 +31,7 @@ import (
|
|||
|
||||
const (
|
||||
// ContainerdConfFile is the path to the containerd configuration
|
||||
ContainerdConfFile = "/etc/containerd/config.toml"
|
||||
containerdConfigFile = "/etc/containerd/config.toml"
|
||||
containerdConfigTemplate = `root = "/var/lib/containerd"
|
||||
state = "/run/containerd"
|
||||
oom_score = 0
|
||||
|
@ -163,7 +163,7 @@ func (r *Containerd) Available() error {
|
|||
|
||||
// generateContainerdConfig sets up /etc/containerd/config.toml
|
||||
func generateContainerdConfig(cr CommandRunner, imageRepository string, k8sVersion string) error {
|
||||
cPath := ContainerdConfFile
|
||||
cPath := containerdConfigFile
|
||||
t, err := template.New("containerd.config.toml").Parse(containerdConfigTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
|
||||
const (
|
||||
// CRIOConfFile is the path to the CRI-O configuration
|
||||
CRIOConfFile = "/etc/crio/crio.conf"
|
||||
crioConfigFile = "/etc/crio/crio.conf"
|
||||
crioConfigTemplate = `# The CRI-O configuration file specifies all of the available configuration
|
||||
# options and command-line flags for the crio(8) OCI Kubernetes Container Runtime
|
||||
# daemon, but in a TOML format that can be more easily modified and versioned.
|
||||
|
@ -388,7 +388,7 @@ image-endpoint: unix://{{.Socket}}
|
|||
|
||||
// generateCRIOConfig sets up /etc/crio/crio.conf
|
||||
func generateCRIOConfig(cr CommandRunner, imageRepository string, k8sVersion string) error {
|
||||
cPath := CRIOConfFile
|
||||
cPath := crioConfigFile
|
||||
t, err := template.New("crio.conf").Parse(crioConfigTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue