mirror of
https://github.com/rancher/rke.git
synced 2025-09-18 08:06:20 +00:00
Add HA
Add relative path for local kube config Add default cluster yaml config name
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user