From 9fac552bf8f17553d40149b12150dfcc5cd3b0f1 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Thu, 22 Aug 2019 12:11:11 +0100 Subject: [PATCH] Avoid validation error in `eksctl cluster create --without-nodegroup` --- pkg/ctl/cmdutils/configfile.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/ctl/cmdutils/configfile.go b/pkg/ctl/cmdutils/configfile.go index 5167e851c9..c15fd0b86f 100644 --- a/pkg/ctl/cmdutils/configfile.go +++ b/pkg/ctl/cmdutils/configfile.go @@ -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, "")