2017-07-27 19:27:55 +00:00
|
|
|
package instances
|
|
|
|
|
|
|
|
import (
|
|
|
|
compute "google.golang.org/api/compute/v1"
|
|
|
|
|
|
|
|
"k8s.io/ingress/controllers/gce/utils"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Helper method to create instance groups.
|
|
|
|
// This method exists to ensure that we are using the same logic at all places.
|
2017-09-12 03:29:49 +00:00
|
|
|
func EnsureInstanceGroupsAndPorts(nodePool NodePool, namer *utils.Namer, port int64) ([]*compute.InstanceGroup, *compute.NamedPort, error) {
|
2017-07-27 19:27:55 +00:00
|
|
|
return nodePool.AddInstanceGroup(namer.IGName(), port)
|
|
|
|
}
|