mirror of https://github.com/kubernetes/kops.git
Use default subnet when creating IG
We had this logic before, but I accidentally bypassed it in #2124.
This commit is contained in:
parent
7bd0a6a703
commit
65bcbe7729
|
@ -150,19 +150,15 @@ func RunCreateInstanceGroup(f *util.Factory, cmd *cobra.Command, args []string,
|
||||||
}
|
}
|
||||||
ig.Spec.Role = role
|
ig.Spec.Role = role
|
||||||
|
|
||||||
if len(options.Subnets) == 0 {
|
|
||||||
return fmt.Errorf("cannot create instance group without subnets; specify --subnet flag(s)")
|
|
||||||
}
|
|
||||||
ig.Spec.Subnets = options.Subnets
|
ig.Spec.Subnets = options.Subnets
|
||||||
|
|
||||||
ig, err = cloudup.PopulateInstanceGroupSpec(cluster, ig, channel)
|
ig, err = cloudup.PopulateInstanceGroupSpec(cluster, ig, channel)
|
||||||
|
|
||||||
ig.AddInstanceGroupNodeLabel()
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ig.AddInstanceGroupNodeLabel()
|
||||||
|
|
||||||
if options.DryRun {
|
if options.DryRun {
|
||||||
|
|
||||||
if options.Output == "" {
|
if options.Output == "" {
|
||||||
|
|
Loading…
Reference in New Issue