Let operator manage autoscaling of node groups

This commit is contained in:
katexochen 2022-09-15 16:48:32 +02:00 committed by Paul Meyer
parent 67d9be38d7
commit e301f575df
18 changed files with 499 additions and 42 deletions

View file

@ -40,3 +40,12 @@ func uriNormalize(imageURI string) string {
}
return matches[1]
}
// ensureURIPrefixed ensures that a compute API URI is prefixed with the optional URI prefix.
func ensureURIPrefixed(uri string) string {
matches := computeAPIBase.FindStringSubmatch(uri)
if len(matches) == 2 {
return uri
}
return "https://www.googleapis.com/compute/v1/" + uri
}