From 99d2915da5e6cdd50c72c3b27cb18f9f759714b4 Mon Sep 17 00:00:00 2001 From: Sam Lockart Date: Wed, 4 Sep 2024 15:04:28 +0900 Subject: [PATCH 1/2] prefer clustername over kubernetesclustername --- pkg/cloud/services/eks/roles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cloud/services/eks/roles.go b/pkg/cloud/services/eks/roles.go index f6892545ed..db0cc434c9 100644 --- a/pkg/cloud/services/eks/roles.go +++ b/pkg/cloud/services/eks/roles.go @@ -183,7 +183,7 @@ func (s *NodegroupService) reconcileNodegroupIAMRole() error { s.scope.Info("no EKS nodegroup role specified, using role based on nodegroup name") roleName, err = eks.GenerateEKSName( "nodegroup-iam-service-role", - fmt.Sprintf("%s-%s", s.scope.KubernetesClusterName(), s.scope.NodegroupName()), + fmt.Sprintf("%s-%s", s.scope.ClusterName(), s.scope.NodegroupName()), maxIAMRoleNameLength, ) if err != nil { @@ -304,7 +304,7 @@ func (s *FargateService) reconcileFargateIAMRole() (requeue bool, err error) { s.scope.Info("no EKS fargate role specified, using role based on fargate profile name") roleName, err = eks.GenerateEKSName( "fargate", - fmt.Sprintf("%s-%s", s.scope.KubernetesClusterName(), s.scope.FargateProfile.Spec.ProfileName), + fmt.Sprintf("%s-%s", s.scope.ClusterName(), s.scope.FargateProfile.Spec.ProfileName), maxIAMRoleNameLength, ) if err != nil { From 0ed02904788b16f8e10ba5068b69b218b042d357 Mon Sep 17 00:00:00 2001 From: Sam Lockart Date: Wed, 4 Sep 2024 15:51:03 +0900 Subject: [PATCH 2/2] revert change to ng role service --- pkg/cloud/services/eks/roles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloud/services/eks/roles.go b/pkg/cloud/services/eks/roles.go index db0cc434c9..7742ace69d 100644 --- a/pkg/cloud/services/eks/roles.go +++ b/pkg/cloud/services/eks/roles.go @@ -183,7 +183,7 @@ func (s *NodegroupService) reconcileNodegroupIAMRole() error { s.scope.Info("no EKS nodegroup role specified, using role based on nodegroup name") roleName, err = eks.GenerateEKSName( "nodegroup-iam-service-role", - fmt.Sprintf("%s-%s", s.scope.ClusterName(), s.scope.NodegroupName()), + fmt.Sprintf("%s-%s", s.scope.KubernetesClusterName(), s.scope.NodegroupName()), maxIAMRoleNameLength, ) if err != nil {