mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
Refactor types
This commit is contained in:
@@ -8,10 +8,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 runKubeAPI(host *hosts.Host, etcdHosts []*hosts.Host, kubeAPIService v1.KubeAPIService) error {
|
||||
func runKubeAPI(host *hosts.Host, etcdHosts []*hosts.Host, kubeAPIService v3.KubeAPIService) error {
|
||||
etcdConnString := GetEtcdConnString(etcdHosts)
|
||||
imageCfg, hostCfg := buildKubeAPIConfig(host, kubeAPIService, etcdConnString)
|
||||
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeAPIContainerName, host.Address, ControlRole)
|
||||
@@ -21,7 +21,7 @@ func removeKubeAPI(host *hosts.Host) error {
|
||||
return docker.DoRemoveContainer(host.DClient, KubeAPIContainerName, host.Address)
|
||||
}
|
||||
|
||||
func buildKubeAPIConfig(host *hosts.Host, kubeAPIService v1.KubeAPIService, etcdConnString string) (*container.Config, *container.HostConfig) {
|
||||
func buildKubeAPIConfig(host *hosts.Host, kubeAPIService v3.KubeAPIService, etcdConnString string) (*container.Config, *container.HostConfig) {
|
||||
imageCfg := &container.Config{
|
||||
Image: kubeAPIService.Image,
|
||||
Entrypoint: []string{"kube-apiserver",
|
||||
|
Reference in New Issue
Block a user