1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +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,18 +1,19 @@
package services
import (
"github.com/alena1108/cluster-controller/client/v1"
"github.com/docker/docker/api/types/container"
"github.com/rancher/rke/docker"
"github.com/rancher/rke/hosts"
"github.com/rancher/rke/pki"
)
func runKubeproxy(host hosts.Host, kubeproxyService Kubeproxy) error {
func runKubeproxy(host hosts.Host, kubeproxyService v1.KubeproxyService) error {
imageCfg, hostCfg := buildKubeproxyConfig(host, kubeproxyService)
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeproxyContainerName, host.Hostname, WorkerRole)
}
func buildKubeproxyConfig(host hosts.Host, kubeproxyService Kubeproxy) (*container.Config, *container.HostConfig) {
func buildKubeproxyConfig(host hosts.Host, kubeproxyService v1.KubeproxyService) (*container.Config, *container.HostConfig) {
imageCfg := &container.Config{
Image: kubeproxyService.Image,
Cmd: []string{"/hyperkube",