diff --git a/pkg/agent/config/config.go b/pkg/agent/config/config.go index 04a720bc..01e415fe 100644 --- a/pkg/agent/config/config.go +++ b/pkg/agent/config/config.go @@ -378,7 +378,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N if envInfo.Rootless { nodePasswordRoot = filepath.Join(envInfo.DataDir, "agent") } - nodeConfigPath := filepath.Join(nodePasswordRoot, "etc", "rancher", "node") + nodeConfigPath := filepath.Join(nodePasswordRoot, "etc", "k8e", "node") if err := os.MkdirAll(nodeConfigPath, 0755); err != nil { return nil, err } diff --git a/pkg/cli/cmds/agent.go b/pkg/cli/cmds/agent.go index 563ccc9e..5edce355 100644 --- a/pkg/cli/cmds/agent.go +++ b/pkg/cli/cmds/agent.go @@ -140,7 +140,7 @@ var ( Name: "private-registry", Usage: "(agent/runtime) Private registry configuration file", Destination: &AgentConfig.PrivateRegistry, - Value: "/etc/rancher/" + version.Program + "/registries.yaml", + Value: "/etc/" + version.Program + "/registries.yaml", } AirgapExtraRegistryFlag = &cli.StringSliceFlag{ Name: "airgap-extra-registry", diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index c91b6665..1e0a4c4b 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -110,7 +110,7 @@ var ( ServerConfig Server DataDirFlag = &cli.StringFlag{ Name: "data-dir,d", - Usage: "(data) Folder to hold state default /var/lib/" + version.Program + " or ${HOME}/.rancher/" + version.Program + " if not root", + Usage: "(data) Folder to hold state default /var/lib/" + version.Program + " or ${HOME}/." + version.Program + " if not root", Destination: &ServerConfig.DataDir, EnvVar: version.ProgramUpper + "_DATA_DIR", } diff --git a/pkg/rootless/mounts.go b/pkg/rootless/mounts.go index bf4c6b85..485ddcaa 100644 --- a/pkg/rootless/mounts.go +++ b/pkg/rootless/mounts.go @@ -35,7 +35,7 @@ func setupMounts(stateDir string) error { {"/var/log", filepath.Join(stateDir, "logs")}, {"/var/lib/cni", filepath.Join(stateDir, "cni")}, {"/var/lib/kubelet", filepath.Join(stateDir, "kubelet")}, - {"/etc/rancher", filepath.Join(stateDir, "etc", "rancher")}, + {"/etc/k8e", filepath.Join(stateDir, "etc", "k8e")}, {"/run/k8e/containerd", filepath.Join(runDir, "k8e", "containerd")}, } diff --git a/pkg/server/router.go b/pkg/server/router.go index 6ae93120..58017cc2 100644 --- a/pkg/server/router.go +++ b/pkg/server/router.go @@ -447,7 +447,7 @@ func verifyLocalPassword(ctx context.Context, config *Config, mu *sync.Mutex, de if config.ControlConfig.Rootless { nodePasswordRoot = filepath.Join(path.Dir(config.ControlConfig.DataDir), "agent") } - nodeConfigPath := filepath.Join(nodePasswordRoot, "etc", "rancher", "node") + nodeConfigPath := filepath.Join(nodePasswordRoot, "etc", "k8e", "node") nodePasswordFile := filepath.Join(nodeConfigPath, "password") passBytes, err := os.ReadFile(nodePasswordFile)