1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-15 22:49:13 +00:00

Use RKE cluster controller structures

This commit is contained in:
galal-hussein
2017-11-09 21:50:49 +02:00
parent ad69078b06
commit 3cfe3d7ea8
17 changed files with 66 additions and 101 deletions

View File

@@ -2,13 +2,14 @@ package services
import (
"github.com/Sirupsen/logrus"
"github.com/alena1108/cluster-controller/client/v1"
"github.com/docker/docker/api/types/container"
"github.com/docker/go-connections/nat"
"github.com/rancher/rke/docker"
"github.com/rancher/rke/hosts"
)
func RunEtcdPlane(etcdHosts []hosts.Host, etcdService Etcd) error {
func RunEtcdPlane(etcdHosts []hosts.Host, etcdService v1.ETCDService) error {
logrus.Infof("[%s] Building up Etcd Plane..", ETCDRole)
for _, host := range etcdHosts {
imageCfg, hostCfg := buildEtcdConfig(host, etcdService)
@@ -21,7 +22,7 @@ func RunEtcdPlane(etcdHosts []hosts.Host, etcdService Etcd) error {
return nil
}
func buildEtcdConfig(host hosts.Host, etcdService Etcd) (*container.Config, *container.HostConfig) {
func buildEtcdConfig(host hosts.Host, etcdService v1.ETCDService) (*container.Config, *container.HostConfig) {
imageCfg := &container.Config{
Image: etcdService.Image,
Cmd: []string{"/usr/local/bin/etcd",