Skip to content

Commit 1de6849

Browse files
authored
Merge pull request #3713 from Skarlso/fix_checking_owner
Use the eksClusterName passed in to the function instead of the scope configured one
2 parents 4d42a8c + 2a63339 commit 1de6849

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/cloud/services/eks/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (s *Service) createCluster(eksClusterName string) (*eks.Cluster, error) {
371371
additionalTags := s.scope.AdditionalTags()
372372

373373
// Set the cloud provider tag
374-
additionalTags[infrav1.ClusterAWSCloudProviderTagKey(s.scope.KubernetesClusterName())] = string(infrav1.ResourceLifecycleOwned)
374+
additionalTags[infrav1.ClusterAWSCloudProviderTagKey(eksClusterName)] = string(infrav1.ResourceLifecycleOwned)
375375
tags := make(map[string]*string)
376376
for k, v := range additionalTags {
377377
tagValue := v

pkg/cloud/services/eks/cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ func TestCreateIPv6Cluster(t *testing.T) {
750750
IpFamily: pointer.StringPtr("ipv6"),
751751
},
752752
Tags: map[string]*string{
753-
"kubernetes.io/cluster/": pointer.StringPtr("owned"),
753+
"kubernetes.io/cluster/cluster-name": pointer.StringPtr("owned"),
754754
},
755755
}).Return(&eks.CreateClusterOutput{}, nil)
756756
iamMock.EXPECT().GetRole(&iam.GetRoleInput{

pkg/cloud/services/iamauth/reconcile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (s *Service) ReconcileIAMAuthenticator(ctx context.Context) error {
7878
}
7979
}
8080

81-
s.scope.Info("Reconciled aws-iam-authenticator configuration", "cluster", klog.KRef("", s.scope.KubernetesClusterName()))
81+
s.scope.Info("Reconciled aws-iam-authenticator configuration", "cluster", klog.KRef("", s.scope.Name()))
8282

8383
return nil
8484
}

0 commit comments

Comments
 (0)