mirror of
https://github.com/rancher/rke.git
synced 2025-09-25 14:48:06 +00:00
Adjust Windows worker plan
**Issue:** https://github.com/rancher/rancher/issues/22676
This commit is contained in:
committed by
Alena Prokharchyk
parent
24fe45b113
commit
f45fc47dca
@@ -494,7 +494,7 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, prefixPath string, svcOp
|
|||||||
}
|
}
|
||||||
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
||||||
Binds = []string{
|
Binds = []string{
|
||||||
// put the cloud provider configuration to the host
|
// put the execution binaries and cloud provider configuration to the host
|
||||||
fmt.Sprintf("%s:c:/host/etc/kubernetes", path.Join(prefixPath, "/etc/kubernetes")),
|
fmt.Sprintf("%s:c:/host/etc/kubernetes", path.Join(prefixPath, "/etc/kubernetes")),
|
||||||
// put the flexvolume plugins or private registry docker configuration to the host
|
// put the flexvolume plugins or private registry docker configuration to the host
|
||||||
fmt.Sprintf("%s:c:/host/var/lib/kubelet", path.Join(prefixPath, "/var/lib/kubelet")),
|
fmt.Sprintf("%s:c:/host/var/lib/kubelet", path.Join(prefixPath, "/var/lib/kubelet")),
|
||||||
@@ -600,7 +600,7 @@ func (c *Cluster) BuildKubeProxyProcess(host *hosts.Host, prefixPath string, svc
|
|||||||
}
|
}
|
||||||
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
||||||
Binds = []string{
|
Binds = []string{
|
||||||
// put the cloud provider configuration to the host
|
// put the execution binaries to the host
|
||||||
fmt.Sprintf("%s:c:/host/etc/kubernetes", path.Join(prefixPath, "/etc/kubernetes")),
|
fmt.Sprintf("%s:c:/host/etc/kubernetes", path.Join(prefixPath, "/etc/kubernetes")),
|
||||||
// exchange resources with other components
|
// exchange resources with other components
|
||||||
fmt.Sprintf("%s:c:/host/run", path.Join(prefixPath, "/run")),
|
fmt.Sprintf("%s:c:/host/run", path.Join(prefixPath, "/run")),
|
||||||
@@ -685,7 +685,7 @@ func (c *Cluster) BuildProxyProcess(host *hosts.Host, prefixPath string) v3.Proc
|
|||||||
Binds := []string{}
|
Binds := []string{}
|
||||||
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
||||||
Binds = []string{
|
Binds = []string{
|
||||||
// generate the configuration to the host
|
// put the execution binaries and generate the configuration to the host
|
||||||
fmt.Sprintf("%s:c:/host/etc/nginx", path.Join(prefixPath, "/etc/nginx")),
|
fmt.Sprintf("%s:c:/host/etc/nginx", path.Join(prefixPath, "/etc/nginx")),
|
||||||
// exchange resources with other components
|
// exchange resources with other components
|
||||||
fmt.Sprintf("%s:c:/host/run", path.Join(prefixPath, "/run")),
|
fmt.Sprintf("%s:c:/host/run", path.Join(prefixPath, "/run")),
|
||||||
@@ -812,8 +812,8 @@ func (c *Cluster) BuildSidecarProcess(host *hosts.Host, prefixPath string) v3.Pr
|
|||||||
Binds := []string{}
|
Binds := []string{}
|
||||||
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
||||||
Binds = []string{
|
Binds = []string{
|
||||||
// put the cni binaries to the host
|
// put the execution binaries and the cni binaries to the host
|
||||||
fmt.Sprintf("%s:c:/host/opt/cni/bin", path.Join(prefixPath, "/opt/cni/bin")),
|
fmt.Sprintf("%s:c:/host/opt", path.Join(prefixPath, "/opt")),
|
||||||
// put the cni configuration to the host
|
// put the cni configuration to the host
|
||||||
fmt.Sprintf("%s:c:/host/etc/cni/net.d", path.Join(prefixPath, "/etc/cni/net.d")),
|
fmt.Sprintf("%s:c:/host/etc/cni/net.d", path.Join(prefixPath, "/etc/cni/net.d")),
|
||||||
// put the cni network component configuration to the host
|
// put the cni network component configuration to the host
|
||||||
@@ -828,10 +828,15 @@ func (c *Cluster) BuildSidecarProcess(host *hosts.Host, prefixPath string) v3.Pr
|
|||||||
RestartPolicy = "always"
|
RestartPolicy = "always"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetworkMode := "none"
|
||||||
|
if host.DockerInfo.OSType == "windows" { // compatible with Windows
|
||||||
|
NetworkMode = ""
|
||||||
|
}
|
||||||
|
|
||||||
registryAuthConfig, _, _ := docker.GetImageRegistryConfig(c.SystemImages.KubernetesServicesSidecar, c.PrivateRegistriesMap)
|
registryAuthConfig, _, _ := docker.GetImageRegistryConfig(c.SystemImages.KubernetesServicesSidecar, c.PrivateRegistriesMap)
|
||||||
return v3.Process{
|
return v3.Process{
|
||||||
Name: services.SidekickContainerName,
|
Name: services.SidekickContainerName,
|
||||||
NetworkMode: "none",
|
NetworkMode: NetworkMode,
|
||||||
RestartPolicy: RestartPolicy,
|
RestartPolicy: RestartPolicy,
|
||||||
Binds: getUniqStringList(Binds),
|
Binds: getUniqStringList(Binds),
|
||||||
Env: getUniqStringList(Env),
|
Env: getUniqStringList(Env),
|
||||||
|
Reference in New Issue
Block a user