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"
|
||||
ROS = "RancherOS"
|
||||
ROSPrefixPath = "/opt/rke"
|
||||
CoreOS = "CoreOS"
|
||||
CoreOSPrefixPath = "/opt/rke"
|
||||
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 {
|
||||
var prefixPath string
|
||||
if strings.Contains(osType, B2DOS) {
|
||||
switch {
|
||||
case strings.Contains(osType, B2DOS):
|
||||
prefixPath = B2DPrefixPath
|
||||
} else if strings.Contains(osType, ROS) {
|
||||
case strings.Contains(osType, ROS):
|
||||
prefixPath = ROSPrefixPath
|
||||
} else {
|
||||
case strings.Contains(osType, CoreOS):
|
||||
prefixPath = CoreOSPrefixPath
|
||||
default:
|
||||
prefixPath = c.PrefixPath
|
||||
}
|
||||
return prefixPath
|
||||
|
@@ -41,11 +41,11 @@ type Host struct {
|
||||
|
||||
const (
|
||||
ToCleanEtcdDir = "/var/lib/etcd"
|
||||
ToCleanSSLDir = "/etc/kubernetes"
|
||||
ToCleanCNIConf = "/etc/cni"
|
||||
ToCleanCNIBin = "/opt/cni"
|
||||
ToCleanSSLDir = "/etc/kubernetes/"
|
||||
ToCleanCNIConf = "/etc/cni/"
|
||||
ToCleanCNIBin = "/opt/cni/"
|
||||
ToCleanCNILib = "/var/lib/cni"
|
||||
ToCleanCalicoRun = "/var/run/calico"
|
||||
ToCleanCalicoRun = "/var/run/calico/"
|
||||
ToCleanTempCertPath = "/etc/kubernetes/.tmp/"
|
||||
CleanerContainerName = "kube-cleaner"
|
||||
)
|
||||
|
Reference in New Issue
Block a user