1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-18 08:06:20 +00:00
Add relative path for local kube config

Add default cluster yaml config name
This commit is contained in:
galal-hussein
2017-11-15 03:12:33 +02:00
parent c59f5e4d07
commit 703a4fd812
21 changed files with 179 additions and 39 deletions

View File

@@ -3,7 +3,6 @@ package services
import (
"github.com/rancher/rke/hosts"
"github.com/rancher/rke/k8s"
"github.com/rancher/rke/pki"
"github.com/rancher/types/apis/cluster.cattle.io/v1"
"github.com/sirupsen/logrus"
)
@@ -22,8 +21,13 @@ func RunWorkerPlane(controlHosts []hosts.Host, workerHosts []hosts.Host, workerS
}
}
for _, host := range workerHosts {
// run nginx proxy
err := runNginxProxy(host, controlHosts)
if err != nil {
return err
}
// run kubelet
err := runKubelet(host, workerServices.Kubelet, false)
err = runKubelet(host, workerServices.Kubelet, false)
if err != nil {
return err
}
@@ -37,9 +41,9 @@ func RunWorkerPlane(controlHosts []hosts.Host, workerHosts []hosts.Host, workerS
return nil
}
func UpgradeWorkerPlane(controlHosts []hosts.Host, workerHosts []hosts.Host, workerServices v1.RKEConfigServices) error {
func UpgradeWorkerPlane(controlHosts []hosts.Host, workerHosts []hosts.Host, workerServices v1.RKEConfigServices, localConfigPath string) error {
logrus.Infof("[%s] Upgrading Worker Plane..", WorkerRole)
k8sClient, err := k8s.NewClient(pki.KubeAdminConfigPath)
k8sClient, err := k8s.NewClient(localConfigPath)
if err != nil {
return err
}