Don't allow node group information in GKE

This commit is contained in:
Marcin Wielgus 2017-08-29 19:42:01 +02:00
parent 81e9226d17
commit 36148b02b8
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ type GceCloudProvider struct {
// BuildGceCloudProvider builds CloudProvider implementation for GCE.
func BuildGceCloudProvider(gceManager *GceManager, specs []string) (*GceCloudProvider, error) {
if gceManager.mode == ModeGKE && len(specs) != 0 {
return nil, fmt.Errorf("GKE gets nodegroup specification via API, command line specs are not allowed")
}
gce := &GceCloudProvider{
gceManager: gceManager,
}