Skip to content

Commit

Permalink
check if cluster exists in local map
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Jan 13, 2025
1 parent eb2c065 commit 35adcd8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/srv/discovery/kube_integration_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ func (s *Server) enrollEKSClusters(region, integration, discoveryConfigName stri
s.Log.DebugContext(ctx, "EKS cluster already has installed kube agent", "cluster_name", r.EksClusterName)
}

cluster := clustersByName[r.EksClusterName]
cluster, ok := clustersByName[r.EksClusterName]
if !ok {
s.Log.WarnContext(ctx, "Received an EnrollEKSCluster result for a cluster which was not part of the requested clusters", "cluster_name", r.EksClusterName, "clusters_install_request", clusterNames)
continue
}
s.awsEKSTasks.addFailedEnrollment(
awsEKSTaskKey{
integration: integration,
Expand Down

0 comments on commit 35adcd8

Please sign in to comment.