1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-25 06:33:56 +00:00

Support to generate Windows worker plan

- Put Windows worker plan generating back to reduce the changing from
Windows on rancher/rancher
- Prepare for rke bootstraps Windows cluster

**Issue:**
https://github.com/rancher/rancher/issues/16460
This commit is contained in:
Frank Mai
2019-07-05 12:23:48 +08:00
committed by Alena Prokharchyk
parent 9544db09d3
commit 277797df0f
6 changed files with 289 additions and 35 deletions

View File

@@ -81,6 +81,14 @@ func runSidekick(ctx context.Context, host *hosts.Host, prsMap map[string]v3.Pri
if _, err := docker.CreateContainer(ctx, host.DClient, host.Address, SidekickContainerName, imageCfg, hostCfg); err != nil {
return err
}
if host.DockerInfo.OSType == "windows" {
// windows dockerfile VOLUME declaration must to satisfy one of them:
// - a non-existing or empty directory
// - a drive other than C:
// so we could use a script to **start** the container to put expected resources into the "shared" directory,
// like the action of `/usr/bin/sidecar.ps1` for windows rke-tools container
return docker.StartContainer(ctx, host.DClient, host.Address, SidekickContainerName)
}
return nil
}