-
Notifications
You must be signed in to change notification settings - Fork 49
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
Watch for node label change event in NicClusterPolicy reconcile loop #419
Conversation
} | ||
|
||
createEnqueue := handler.Funcs{ | ||
CreateFunc: func(e event.CreateEvent, q workqueue.RateLimitingInterface) { |
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.
This won't work. We need to add label after NFD applied feature.node.kubernetes.io/pci-15b3.present label
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.
so it means you need to watch on just updates or create & update IMO
IsController: true, | ||
OwnerType: &mellanoxv1alpha1.NicClusterPolicy{}, | ||
}) | ||
}).Watches(&source.Kind{Type: &corev1.Node{}}, createEnqueue, nodePredicates) |
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.
i think you would want to add this (watching on nodes) only once ?
} | ||
|
||
createEnqueue := handler.Funcs{ | ||
CreateFunc: func(e event.CreateEvent, q workqueue.RateLimitingInterface) { |
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.
so it means you need to watch on just updates or create & update IMO
bf94fa9
to
7cf4323
Compare
7cf4323
to
6fc9863
Compare
6fc9863
to
94b2c34
Compare
94b2c34
to
ea55907
Compare
ea55907
to
a7f0a63
Compare
We need to watch for node create event for correct cluster scale up by adding 'network.nvidia.com/operator.mofed.wait' label. Signed-off-by: Ivan Kolodiazhny <ikolodiazhny@nvidia.com>
a7f0a63
to
29efa09
Compare
We need to watch for node create event for correct cluster scale up by adding 'network.nvidia.com/operator.mofed.wait' label.
Signed-off-by: Ivan Kolodiazhny ikolodiazhny@nvidia.com