Skip to content

Commit

Permalink
Avoid validation error in eksctl cluster create --without-nodegroup
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Aug 22, 2019
1 parent 182a8a2 commit 9fac552
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ctl/cmdutils/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ func NewCreateClusterLoader(cmd *Cmd, ngFilter *NodeGroupFilter) ClusterConfigLo
return fmt.Errorf("status fields are read-only")
}

if ngFilter.ExcludeAll {
l.ClusterConfig.NodeGroups = nil // avoid validation errors when --without-nodegroup is used
}

return ngFilter.ForEach(l.ClusterConfig.NodeGroups, func(i int, ng *api.NodeGroup) error {
// generate nodegroup name or use flag
ng.Name = NodeGroupName(ng.Name, "")
Expand Down

0 comments on commit 9fac552

Please sign in to comment.