-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid reconciling SriovNetworkNodePolicies
multiple times
#478
Avoid reconciling SriovNetworkNodePolicies
multiple times
#478
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 5647611763
💛 - Coveralls |
08d59d4
to
436c496
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
436c496
to
afe02e0
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
afe02e0
to
52dd721
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
}, | ||
UpdateFunc: func(e event.UpdateEvent, q workqueue.RateLimitingInterface) { | ||
log.Log.WithName("SriovNetworkNodePolicy"). | ||
Info("Enqueuing sync for create event", "resource", e.ObjectNew.GetName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: create -> update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general question is it possible for the user to create an object with that name?
can we use a non existing namespace or something like that to be sure there is not going to be an object like that?
}}, time.Second) | ||
} | ||
|
||
squashAndDebounceHandler := handler.Funcs{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: just name it delayedEventHandler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
why do we care ? its just an "event" to trigger reconcile that is not dependent on the specific obj that triggered the event. |
52dd721
to
17987d7
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
`SriovNetworkNodePolicy` reconcile function lists all node policies and updates all SriovNetworkNodeState. Hence there is no need to resync all of them periodically. Avoid triggering multiple reconciliations when creating multiple policies in a row (that is what happens when using yaml files). Signed-off-by: Andrea Panattoni <[email protected]>
Good point. If the user creates a node policy called
Because the controller (and the Reconcile method) are still triggered by every SriovNetworkNodePolicy, as it's the |
17987d7
to
9d8f31e
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thanks!
SriovNetworkNodePolicy
reconcile function lists all node policies and updates all SriovNetworkNodeState. Hence there is no need to resync all of them periodically.Avoid triggering multiple reconciliations when creating multiple policies in a row (that is what happens when using yaml files).