Merge pull request #119603 from borg-land/machine-type-fix

Calculate the correct machine-type
This commit is contained in:
Kubernetes Prow Robot 2023-07-27 17:51:53 -07:00 committed by GitHub
commit 97c7dbcd22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -768,12 +768,15 @@ func (g *GCERunner) updateKernelArguments(instance *compute.Instance, image stri
}
func (g *GCERunner) machineType(machine string) string {
var ret string
if machine == "" && *instanceType != "" {
machine = *instanceType
ret = *instanceType
} else if machine != "" {
ret = machine
} 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 {
// wait until the instance will not response to SSH