From 3aa73873bdf217956abc54c14e804d76a446b52c Mon Sep 17 00:00:00 2001 From: Mike Frisch Date: Tue, 6 Aug 2024 09:10:17 -0400 Subject: [PATCH] fix: resolve segfault in validateBareCluster Signed-off-by: Mike Frisch --- pkg/ctl/cmdutils/configfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ctl/cmdutils/configfile.go b/pkg/ctl/cmdutils/configfile.go index 91161953c9..5e08c50440 100644 --- a/pkg/ctl/cmdutils/configfile.go +++ b/pkg/ctl/cmdutils/configfile.go @@ -463,7 +463,7 @@ func validateBareCluster(clusterConfig *api.ClusterConfig) error { return nil } if clusterConfig.HasNodes() || clusterConfig.IsFargateEnabled() || clusterConfig.Karpenter != nil || clusterConfig.HasGitOpsFluxConfigured() || - (clusterConfig.IAM != nil && (len(clusterConfig.IAM.ServiceAccounts) > 0) || len(clusterConfig.IAM.PodIdentityAssociations) > 0) { + (clusterConfig.IAM != nil && ((len(clusterConfig.IAM.ServiceAccounts) > 0) || len(clusterConfig.IAM.PodIdentityAssociations) > 0)) { return errors.New("fields nodeGroups, managedNodeGroups, fargateProfiles, karpenter, gitops, iam.serviceAccounts, " + "and iam.podIdentityAssociations are not supported during cluster creation in a cluster without VPC CNI; please remove these fields " + "and add them back after cluster creation is successful")