Skip to content
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 NDM code #626

Open
kmova opened this issue Aug 29, 2021 · 0 comments
Open

Refactor NDM code #626

kmova opened this issue Aug 29, 2021 · 0 comments
Labels
help wanted requires extra attention

Comments

@kmova
Copy link
Contributor

kmova commented Aug 29, 2021

There are several aspects of the code that can be refactored as listed below:

  • Move some of the code from /cmd folder into parent folder and keep the /cmd only for launching the service by pulling in different packages together. Examples:
    • Move Probe logic from cmd/ndm-daemonset to /probes.
    • Move Filter logic from cmd/ndm-daemonset to /filter.
  • Move environment variables handling to a separate package
  • add more verbose logs to all types of filters, with info on why a device was included or excluded.
  • Refact all the unused label constants and make use of standard label prefixes from client package.
  • Refactor os disk filter code, so that multiple disks are not added in the exclude path
    If the user has given the following disk config:
    /dev/sda1 -- /boot
    /dev/sda1 -- /
    
    And the user has exclude points /,/boot. The filterpath will have /dev/sda twice in the exclude path which is unnecessary. This code part need to be modified.
@kmova kmova added the help wanted requires extra attention label Aug 29, 2021
@kmova kmova changed the title Refactor NDM code under cmd/ Refactor NDM code Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires extra attention
Projects
None yet
Development

No branches or pull requests

1 participant