mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
Add prefix path for CoreOS
This commit is contained in:
committed by
Alena Prokharchyk
parent
67ce4a9035
commit
2c64afeb3e
@@ -25,6 +25,8 @@ const (
|
|||||||
B2DPrefixPath = "/mnt/sda1/rke"
|
B2DPrefixPath = "/mnt/sda1/rke"
|
||||||
ROS = "RancherOS"
|
ROS = "RancherOS"
|
||||||
ROSPrefixPath = "/opt/rke"
|
ROSPrefixPath = "/opt/rke"
|
||||||
|
CoreOS = "CoreOS"
|
||||||
|
CoreOSPrefixPath = "/opt/rke"
|
||||||
ContainerNameLabel = "io.rancher.rke.container.name"
|
ContainerNameLabel = "io.rancher.rke.container.name"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -652,11 +654,14 @@ func BuildPortChecksFromPortList(host *hosts.Host, portList []string, proto stri
|
|||||||
|
|
||||||
func (c *Cluster) getPrefixPath(osType string) string {
|
func (c *Cluster) getPrefixPath(osType string) string {
|
||||||
var prefixPath string
|
var prefixPath string
|
||||||
if strings.Contains(osType, B2DOS) {
|
switch {
|
||||||
|
case strings.Contains(osType, B2DOS):
|
||||||
prefixPath = B2DPrefixPath
|
prefixPath = B2DPrefixPath
|
||||||
} else if strings.Contains(osType, ROS) {
|
case strings.Contains(osType, ROS):
|
||||||
prefixPath = ROSPrefixPath
|
prefixPath = ROSPrefixPath
|
||||||
} else {
|
case strings.Contains(osType, CoreOS):
|
||||||
|
prefixPath = CoreOSPrefixPath
|
||||||
|
default:
|
||||||
prefixPath = c.PrefixPath
|
prefixPath = c.PrefixPath
|
||||||
}
|
}
|
||||||
return prefixPath
|
return prefixPath
|
||||||
|
@@ -41,11 +41,11 @@ type Host struct {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ToCleanEtcdDir = "/var/lib/etcd"
|
ToCleanEtcdDir = "/var/lib/etcd"
|
||||||
ToCleanSSLDir = "/etc/kubernetes"
|
ToCleanSSLDir = "/etc/kubernetes/"
|
||||||
ToCleanCNIConf = "/etc/cni"
|
ToCleanCNIConf = "/etc/cni/"
|
||||||
ToCleanCNIBin = "/opt/cni"
|
ToCleanCNIBin = "/opt/cni/"
|
||||||
ToCleanCNILib = "/var/lib/cni"
|
ToCleanCNILib = "/var/lib/cni"
|
||||||
ToCleanCalicoRun = "/var/run/calico"
|
ToCleanCalicoRun = "/var/run/calico/"
|
||||||
ToCleanTempCertPath = "/etc/kubernetes/.tmp/"
|
ToCleanTempCertPath = "/etc/kubernetes/.tmp/"
|
||||||
CleanerContainerName = "kube-cleaner"
|
CleanerContainerName = "kube-cleaner"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user