-
Notifications
You must be signed in to change notification settings - Fork 13
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
Level driven controller #85
Conversation
6ff8cef
to
8373cd1
Compare
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.
The approach looks good to me.
I do see though we're missing handling the case where an update is made to the networks annotation while the controller is not present:
- t=1 while the controller is not started or crashed or restarting after a rollup upgrade etc., a user changed a running pod annotation to hotplug an interface
- t=2 controller start
To reconcile, on startup we need to do call pnc.podsLister.List()
to add all Running pods on the controller's node that are not in the hostNetwork to the pnc.workqueue
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
When converging the desired / current state differences we must always omit the default network, but when we are computing the current state **after** deleting interfaces, the default network's state must always be present. Signed-off-by: Miguel Duarte Barroso <[email protected]>
8373cd1
to
a42614b
Compare
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Good point; would you mind opening an issue and pushing a PR to address this @kmabda ? I do not know exactly where that instruction should be put. |
What this PR does / why we need it:
Re-write the controller as level driven, instead of edge-triggered.
This makes user interaction more resilient, since the controller will try to materialize the desired state (network-selection-elements) into the current state (network-status).
There is one behavior that needs to be highlighted: the existing interfaces need to always feature the interface name in the desired state (network selection elements); take the following example:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #48
Fixes #66
Special notes for your reviewer (optional):
Depends-on: #46