Skip to content

Commit

Permalink
Merge branch 'main' into add-events-based-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam committed Nov 14, 2024
2 parents 34502eb + 992689c commit a3462ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/karpenter/templates/clusterrole-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
- apiGroups: ["policy"]
resources: ["poddisruptionbudgets"]
verbs: ["get", "list", "watch"]
- apiGroups: []
- apiGroups: [""]
resources: ["events"]
verbs: ["get", list, "watch"]
# Write
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error) {
Values: []string{v1.NodeClassTagKey},
},
{
Name: aws.String(v1.EKSClusterNameTagKey),
Name: aws.String(fmt.Sprintf("tag:%s", v1.EKSClusterNameTagKey)),
Values: []string{options.FromContext(ctx).ClusterName},
},
instanceStateFilter,
Expand All @@ -166,10 +166,10 @@ func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error) {

for paginator.HasMorePages() {
page, err := paginator.NextPage(ctx)
out.Reservations = append(out.Reservations, page.Reservations...)
if err != nil {
return nil, fmt.Errorf("describing ec2 instances, %w", err)
}
out.Reservations = append(out.Reservations, page.Reservations...)
}
instances, err := instancesFromOutput(out)
return instances, cloudprovider.IgnoreNodeClaimNotFoundError(err)
Expand Down

0 comments on commit a3462ac

Please sign in to comment.