mirror of
https://github.com/rancher/rke.git
synced 2025-09-12 13:18:47 +00:00
Refactor types
This commit is contained in:
@@ -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 runKubeproxy(host *hosts.Host, kubeproxyService v1.KubeproxyService) error {
|
||||
func runKubeproxy(host *hosts.Host, kubeproxyService v3.KubeproxyService) error {
|
||||
imageCfg, hostCfg := buildKubeproxyConfig(host, kubeproxyService)
|
||||
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeproxyContainerName, host.Address, WorkerRole)
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func removeKubeproxy(host *hosts.Host) error {
|
||||
return docker.DoRemoveContainer(host.DClient, KubeproxyContainerName, host.Address)
|
||||
}
|
||||
|
||||
func buildKubeproxyConfig(host *hosts.Host, kubeproxyService v1.KubeproxyService) (*container.Config, *container.HostConfig) {
|
||||
func buildKubeproxyConfig(host *hosts.Host, kubeproxyService v3.KubeproxyService) (*container.Config, *container.HostConfig) {
|
||||
imageCfg := &container.Config{
|
||||
Image: kubeproxyService.Image,
|
||||
Entrypoint: []string{"kube-proxy",
|
||||
|
Reference in New Issue
Block a user