fix: Use correct names for kubelet config

With the change to bootkube, kubelet.conf has changed names and is now kubelet-kubeconfig.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This commit is contained in:
Brad Beam
2019-10-10 22:05:12 -05:00
committed by Andrew Rynhard
parent 34599be9f2
commit d3f20db0aa
4 changed files with 6 additions and 5 deletions

View File

@@ -149,7 +149,7 @@ func (k *Kubelet) Runner(config config.Configurator) (runner.Runner, error) {
"/hyperkube", "/hyperkube",
"kubelet", "kubelet",
"--bootstrap-kubeconfig=" + constants.KubeletBootstrapKubeconfig, "--bootstrap-kubeconfig=" + constants.KubeletBootstrapKubeconfig,
"--kubeconfig=/etc/kubernetes/kubeconfig-kubelet", "--kubeconfig=" + constants.KubeletKubeconfig,
"--container-runtime=remote", "--container-runtime=remote",
"--container-runtime-endpoint=unix://" + constants.ContainerdAddress, "--container-runtime-endpoint=unix://" + constants.ContainerdAddress,
"--anonymous-auth=false", "--anonymous-auth=false",

View File

@@ -56,7 +56,7 @@ func (o *OSD) PostFunc(config config.Configurator) (err error) {
// Condition implements the Service interface. // Condition implements the Service interface.
func (o *OSD) Condition(config config.Configurator) conditions.Condition { func (o *OSD) Condition(config config.Configurator) conditions.Condition {
if config.Machine().Type() == machine.Worker { if config.Machine().Type() == machine.Worker {
return conditions.WaitForFileToExist("/etc/kubernetes/kubelet.conf") return conditions.WaitForFileToExist(constants.KubeletKubeconfig)
} }
return nil return nil

View File

@@ -140,6 +140,9 @@ const (
// AdminKubeconfig is the generated admin kubeconfig. // AdminKubeconfig is the generated admin kubeconfig.
AdminKubeconfig = "/etc/kubernetes/kubeconfig" AdminKubeconfig = "/etc/kubernetes/kubeconfig"
// KubeletKubeconfig is the generated kubeconfig for kubelet.
KubeletKubeconfig = "/etc/kubernetes/kubeconfig-kubelet"
// DefaultEtcdVersion is the default target version of etcd. // DefaultEtcdVersion is the default target version of etcd.
DefaultEtcdVersion = "3.3.15-0" DefaultEtcdVersion = "3.3.15-0"

View File

@@ -38,11 +38,9 @@ type Helper struct {
// NewHelper initializes and returns a Helper. // NewHelper initializes and returns a Helper.
func NewHelper() (helper *Helper, err error) { func NewHelper() (helper *Helper, err error) {
kubeconfig := "/etc/kubernetes/kubelet.conf"
var config *restclient.Config var config *restclient.Config
config, err = clientcmd.BuildConfigFromFlags("", kubeconfig) config, err = clientcmd.BuildConfigFromFlags("", constants.KubeletKubeconfig)
if err != nil { if err != nil {
return nil, err return nil, err
} }