1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-18 08:06:20 +00:00

Refactor types

This commit is contained in:
Darren Shepherd
2017-12-05 09:55:58 -07:00
parent 4a17ce82e3
commit df7e40188e
12 changed files with 49 additions and 49 deletions

View File

@@ -7,10 +7,10 @@ import (
"github.com/rancher/rke/docker"
"github.com/rancher/rke/hosts"
"github.com/rancher/rke/pki"
"github.com/rancher/types/apis/cluster.cattle.io/v1"
"github.com/rancher/types/apis/management.cattle.io/v3"
)
func runKubeController(host *hosts.Host, kubeControllerService v1.KubeControllerService) error {
func runKubeController(host *hosts.Host, kubeControllerService v3.KubeControllerService) error {
imageCfg, hostCfg := buildKubeControllerConfig(kubeControllerService)
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeControllerContainerName, host.Address, ControlRole)
}
@@ -19,7 +19,7 @@ func removeKubeController(host *hosts.Host) error {
return docker.DoRemoveContainer(host.DClient, KubeControllerContainerName, host.Address)
}
func buildKubeControllerConfig(kubeControllerService v1.KubeControllerService) (*container.Config, *container.HostConfig) {
func buildKubeControllerConfig(kubeControllerService v3.KubeControllerService) (*container.Config, *container.HostConfig) {
imageCfg := &container.Config{
Image: kubeControllerService.Image,
Entrypoint: []string{"kube-controller-manager",