1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-18 23:07:24 +00:00

hosts: mapping Flatcar from the docker host info

This commit is contained in:
Vincent Batts 2020-08-20 15:02:26 +00:00 committed by Denise
parent e22c29e4bd
commit 4849c2fc2b

View File

@ -58,6 +58,8 @@ const (
ROSPrefixPath = "/opt/rke"
CoreOS = "CoreOS"
CoreOSPrefixPath = "/opt/rke"
FlatcarOS = "Flatcar"
FlatcarOSPrefixPath = "/opt/rke"
WindowsOS = "Windows"
WindowsPrefixPath = "c:/"
)
@ -366,6 +368,8 @@ func (h *Host) SetPrefixPath(clusterPrefixPath string) {
prefixPath = ROSPrefixPath
case strings.Contains(h.DockerInfo.OperatingSystem, CoreOS):
prefixPath = CoreOSPrefixPath
case strings.Contains(h.DockerInfo.OperatingSystem, FlatcarOS):
prefixPath = FlatcarOSPrefixPath
case strings.Contains(h.DockerInfo.OperatingSystem, WindowsOS):
prefixPath = WindowsPrefixPath
default: