mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
scheduler: properly skip DRA events
Because of a misplaced `append` (should have been inside if clause, not after it), some handler from a previous loop iteration was added again. This was harmless because the resulting slice was only used for waiting for cache sync, but should better get fixed anyway.
This commit is contained in:
parent
dbbce2aaba
commit
5269e76990
@ -447,8 +447,8 @@ func addAllEventHandlers(
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
handlers = append(handlers, handlerRegistration)
|
||||
}
|
||||
handlers = append(handlers, handlerRegistration)
|
||||
case framework.ResourceClaim:
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||
if handlerRegistration, err = informerFactory.Resource().V1alpha2().ResourceClaims().Informer().AddEventHandler(
|
||||
@ -456,8 +456,8 @@ func addAllEventHandlers(
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
handlers = append(handlers, handlerRegistration)
|
||||
}
|
||||
handlers = append(handlers, handlerRegistration)
|
||||
case framework.StorageClass:
|
||||
if at&framework.Add != 0 {
|
||||
if handlerRegistration, err = informerFactory.Storage().V1().StorageClasses().Informer().AddEventHandler(
|
||||
|
Loading…
Reference in New Issue
Block a user