Skip to content

Commit 6052a6d

Browse files
Allow core/default networking addons on auto-mode clusters with mixed node types (#8293)
1 parent 1878c18 commit 6052a6d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pkg/apis/eksctl.io/v1alpha5/known_addons.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ var KnownAddons = map[string]struct {
4444
},
4545
}
4646

47-
// HasDefaultAddons reports whether addons contains at least one default addon.
48-
func HasDefaultAddons(addons []*Addon) bool {
47+
// HasDefaultNonAutoAddon reports whether addons contains at least one non-auto mode default addon
48+
func HasDefaultNonAutoAddon(addons []*Addon) bool {
4949
for _, addon := range addons {
5050
addonConfig, ok := KnownAddons[addon.Name]
51-
if ok && addonConfig.IsDefault {
51+
if ok && addonConfig.IsDefault && !addonConfig.IsDefaultAutoMode {
5252
return true
5353
}
5454
}

pkg/ctl/cmdutils/configfile.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,9 @@ func NewCreateClusterLoader(cmd *Cmd, ngFilter *filter.NodeGroupFilter, ng *api.
317317
return errors.New("creation of managed or self-managed nodegroups is not supported during cluster creation " +
318318
"when Auto Mode is enabled; please create them post cluster creation using `eksctl create nodegroup`" +
319319
" after creating core networking addons in the cluster")
320-
}
321-
if api.HasDefaultAddons(clusterConfig.Addons) {
320+
} else if len(clusterConfig.FargateProfiles) == 0 && clusterConfig.RemoteNetworkConfig == nil &&
321+
api.HasDefaultNonAutoAddon(clusterConfig.Addons) {
322+
// Only an error if fargate profiles and hybrid nodes (remote network config) are not set/defined
322323
return errors.New("core networking addons are not required on a cluster using Auto Mode; " +
323324
"if you still wish to create them, use `eksctl create addon` post cluster creation")
324325
}

0 commit comments

Comments
 (0)