mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #119603 from borg-land/machine-type-fix
Calculate the correct machine-type
This commit is contained in:
commit
97c7dbcd22
@ -768,12 +768,15 @@ func (g *GCERunner) updateKernelArguments(instance *compute.Instance, image stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GCERunner) machineType(machine string) string {
|
func (g *GCERunner) machineType(machine string) string {
|
||||||
|
var ret string
|
||||||
if machine == "" && *instanceType != "" {
|
if machine == "" && *instanceType != "" {
|
||||||
machine = *instanceType
|
ret = *instanceType
|
||||||
|
} else if machine != "" {
|
||||||
|
ret = machine
|
||||||
} else {
|
} else {
|
||||||
machine = defaultGCEMachine
|
ret = defaultGCEMachine
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("zones/%s/machineTypes/%s", *zone, machine)
|
return fmt.Sprintf("zones/%s/machineTypes/%s", *zone, ret)
|
||||||
}
|
}
|
||||||
func (g *GCERunner) rebootInstance(instance *compute.Instance) error {
|
func (g *GCERunner) rebootInstance(instance *compute.Instance) error {
|
||||||
// wait until the instance will not response to SSH
|
// wait until the instance will not response to SSH
|
||||||
|
Loading…
Reference in New Issue
Block a user