mirror of https://github.com/kubernetes/kops.git
Download kubectl to /opt/kops/bin on Flatcar OS
Also add it to protokube's PATH. Our flatcar job is currently failing because channels arent being applied. A newly added error log reports that kubectl isn't in protokube's PATH. This adds the kubectl's location (/opt/bin) to protokube's PATH. See https://storage.googleapis.com/kubernetes-jenkins/logs/e2e-kops-aws-distro-imageflatcar/1371379886664454144/artifacts/54.206.100.130/protokube.log
This commit is contained in:
parent
307c0ef6d2
commit
b57318fc3d
|
|
@ -398,7 +398,7 @@ func (c *NodeupModelContext) UseSecureKubelet() bool {
|
||||||
func (c *NodeupModelContext) KubectlPath() string {
|
func (c *NodeupModelContext) KubectlPath() string {
|
||||||
kubeletCommand := "/usr/local/bin"
|
kubeletCommand := "/usr/local/bin"
|
||||||
if c.Distribution == distributions.DistributionFlatcar {
|
if c.Distribution == distributions.DistributionFlatcar {
|
||||||
kubeletCommand = "/opt/bin"
|
kubeletCommand = "/opt/kops/bin"
|
||||||
}
|
}
|
||||||
if c.Distribution == distributions.DistributionContainerOS {
|
if c.Distribution == distributions.DistributionContainerOS {
|
||||||
kubeletCommand = "/home/kubernetes/bin"
|
kubeletCommand = "/home/kubernetes/bin"
|
||||||
|
|
|
||||||
|
|
@ -461,6 +461,11 @@ func (t *ProtokubeBuilder) buildEnvFile() (*nodetasks.File, error) {
|
||||||
envVars[envVar.Name] = envVar.Value
|
envVars[envVar.Name] = envVar.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch t.Distribution {
|
||||||
|
case distributions.DistributionFlatcar:
|
||||||
|
envVars["PATH"] = fmt.Sprintf("/opt/kops/bin:%v", os.Getenv("PATH"))
|
||||||
|
}
|
||||||
|
|
||||||
var sysconfig = ""
|
var sysconfig = ""
|
||||||
for key, value := range envVars {
|
for key, value := range envVars {
|
||||||
sysconfig += key + "=" + value + "\n"
|
sysconfig += key + "=" + value + "\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue