1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-13 13:40:22 +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

@@ -1,6 +1,7 @@
package services
import (
"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"
@@ -8,12 +9,12 @@ import (
"github.com/rancher/rke/pki"
)
func runKubelet(host hosts.Host, kubeletService Kubelet, isMaster bool) error {
func runKubelet(host hosts.Host, kubeletService v1.KubeletService, isMaster bool) error {
imageCfg, hostCfg := buildKubeletConfig(host, kubeletService, isMaster)
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeletContainerName, host.Hostname, WorkerRole)
}
func buildKubeletConfig(host hosts.Host, kubeletService Kubelet, isMaster bool) (*container.Config, *container.HostConfig) {
func buildKubeletConfig(host hosts.Host, kubeletService v1.KubeletService, isMaster bool) (*container.Config, *container.HostConfig) {
imageCfg := &container.Config{
Image: kubeletService.Image,
Cmd: []string{"/hyperkube",