-
Notifications
You must be signed in to change notification settings - Fork 113
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
refactor(pkg, udevevent): decouple udevevent from controller #609
Conversation
As per conventions, packages in the pkg directory should be independent of the overlying applications that use them. The `udevevent` package has tight coupling with the `controller` and `probe` packages from ndm_daemonset. Refactor to make `udevevent` standalone. This includes moving all application (ndm_daemonset in this case) specific code in `udevevent` to appropriate cmd packages and providing an API for the application code to use the functionalities of `udevevent`. Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
@@ -19,10 +19,10 @@ package controller | |||
import ( | |||
"sort" | |||
|
|||
"k8s.io/klog" |
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.
reordering as per convention
Codecov Report
@@ Coverage Diff @@
## master #609 +/- ##
==========================================
- Coverage 48.11% 46.38% -1.73%
==========================================
Files 79 78 -1
Lines 3720 3781 +61
==========================================
- Hits 1790 1754 -36
- Misses 1770 1871 +101
+ Partials 160 156 -4
Continue to review full report at Codecov.
|
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.
given some comments
Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
- use action constant strings from pkg udev - add inline comments Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
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.
have a few questions on the new goroutine and channel for passing error messages.
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
…-archive#609) As per conventions, packages in the pkg directory should be independent of the overlying applications that use them. The `udevevent` package has tight coupling with the `controller` and `probe` packages from ndm_daemonset. Refactor to make `udevevent` standalone. This includes moving all application (ndm_daemonset in this case) specific code in `udevevent` to appropriate cmd packages and providing an API for the application code to use the functionalities of `udevevent`. - remove logging from package - reuse action constants from pkg udev - add inline comments Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
…-archive#609) As per conventions, packages in the pkg directory should be independent of the overlying applications that use them. The `udevevent` package has tight coupling with the `controller` and `probe` packages from ndm_daemonset. Refactor to make `udevevent` standalone. This includes moving all application (ndm_daemonset in this case) specific code in `udevevent` to appropriate cmd packages and providing an API for the application code to use the functionalities of `udevevent`. - remove logging from package - reuse action constants from pkg udev - add inline comments Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
…614) As per conventions, packages in the pkg directory should be independent of the overlying applications that use them. The `udevevent` package has tight coupling with the `controller` and `probe` packages from ndm_daemonset. Refactor to make `udevevent` standalone. This includes moving all application (ndm_daemonset in this case) specific code in `udevevent` to appropriate cmd packages and providing an API for the application code to use the functionalities of `udevevent`. - remove logging from package - reuse action constants from pkg udev - add inline comments Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com> Co-authored-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
As per conventions, packages in the pkg directory should be independent
of the overlying applications that use them. The
udevevent
package hastight coupling with the
controller
andprobe
packages fromndm_daemonset.
Refactor to make
udevevent
standalone. This includesmoving all application (ndm_daemonset in this case) specific code in
udevevent
to appropriate cmd packages and providing an API for theapplication code to use the functionalities of
udevevent
.This PR aligns with the idea raised in #597
Signed-off-by: Aditya Jain aditya.jainadityajain.jain@gmail.com
Checklist:
<type>(<scope>): <subject>