mirror of https://github.com/kubernetes/kops.git
Fix cluster setup when KOPS_ARCH is set
This commit is contained in:
parent
b5afd1d6c4
commit
c02434269f
|
@ -231,16 +231,28 @@ func (b *BootstrapScript) GetDependencies(tasks map[string]fi.Task) []fi.Task {
|
||||||
func (b *BootstrapScript) Run(c *fi.Context) error {
|
func (b *BootstrapScript) Run(c *fi.Context) error {
|
||||||
functions := template.FuncMap{
|
functions := template.FuncMap{
|
||||||
"NodeUpSourceAmd64": func() string {
|
"NodeUpSourceAmd64": func() string {
|
||||||
|
if b.builder.NodeUpAssets[architectures.ArchitectureAmd64] != nil {
|
||||||
return strings.Join(b.builder.NodeUpAssets[architectures.ArchitectureAmd64].Locations, ",")
|
return strings.Join(b.builder.NodeUpAssets[architectures.ArchitectureAmd64].Locations, ",")
|
||||||
|
}
|
||||||
|
return ""
|
||||||
},
|
},
|
||||||
"NodeUpSourceHashAmd64": func() string {
|
"NodeUpSourceHashAmd64": func() string {
|
||||||
|
if b.builder.NodeUpAssets[architectures.ArchitectureAmd64] != nil {
|
||||||
return b.builder.NodeUpAssets[architectures.ArchitectureAmd64].Hash.Hex()
|
return b.builder.NodeUpAssets[architectures.ArchitectureAmd64].Hash.Hex()
|
||||||
|
}
|
||||||
|
return ""
|
||||||
},
|
},
|
||||||
"NodeUpSourceArm64": func() string {
|
"NodeUpSourceArm64": func() string {
|
||||||
|
if b.builder.NodeUpAssets[architectures.ArchitectureArm64] != nil {
|
||||||
return strings.Join(b.builder.NodeUpAssets[architectures.ArchitectureArm64].Locations, ",")
|
return strings.Join(b.builder.NodeUpAssets[architectures.ArchitectureArm64].Locations, ",")
|
||||||
|
}
|
||||||
|
return ""
|
||||||
},
|
},
|
||||||
"NodeUpSourceHashArm64": func() string {
|
"NodeUpSourceHashArm64": func() string {
|
||||||
|
if b.builder.NodeUpAssets[architectures.ArchitectureArm64] != nil {
|
||||||
return b.builder.NodeUpAssets[architectures.ArchitectureArm64].Hash.Hex()
|
return b.builder.NodeUpAssets[architectures.ArchitectureArm64].Hash.Hex()
|
||||||
|
}
|
||||||
|
return ""
|
||||||
},
|
},
|
||||||
"KubeEnv": func() (string, error) {
|
"KubeEnv": func() (string, error) {
|
||||||
return b.kubeEnv(b.ig, c)
|
return b.kubeEnv(b.ig, c)
|
||||||
|
|
Loading…
Reference in New Issue