Skip to content

Commit 61953d0

Browse files
committed
change hash
1 parent fc09d60 commit 61953d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controllers/nodeclass/validation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ func (*Validation) cacheKey(nodeClass *v1.EC2NodeClass, nodePools []*karpv1.Node
321321
sort.Slice(nodePools, func(i, j int) bool {
322322
return nodePools[i].Name < nodePools[j].Name
323323
})
324-
nodePoolReqHashes := lo.Reduce(nodePools, func(agg []uint64, np *karpv1.NodePool, _ int) []uint64 {
324+
nodePoolReqHashes := lo.Reduce(nodePools, func(agg uint64, np *karpv1.NodePool, _ int) uint64 {
325325
reqHash := lo.Must(hashstructure.Hash(np.Spec.Template.Spec.Requirements, hashstructure.FormatV2, &hashstructure.HashOptions{SlicesAsSets: true}))
326-
return append(agg, reqHash)
327-
}, []uint64{})
326+
return lo.Must(hashstructure.Hash([]uint64{agg, reqHash}, hashstructure.FormatV2, &hashstructure.HashOptions{SlicesAsSets: true}))
327+
}, 0)
328328
hash := lo.Must(hashstructure.Hash([]any{
329329
nodeClass.Status.Subnets,
330330
nodeClass.Status.SecurityGroups,

0 commit comments

Comments
 (0)