-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add config field for periodic update interval #28
Add config field for periodic update interval #28
Conversation
Pull Request Test Coverage Report for Build 100
💛 - Coveralls |
340b1d3
to
a00be45
Compare
a00be45
to
cc27c09
Compare
README.md
Outdated
@@ -97,6 +98,9 @@ The plugin has several configuration fields, this section explains each field us | |||
} | |||
``` | |||
|
|||
`periodicUpdateInterval` is the time interval in seconds to update the resouces accourding to host devices changes if there changed. | |||
Note: if `periodicUpdateInterval` is 0 then periodic update for host devices will be disabled. |
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 breaks current default behaviour.
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.
If 0 then use current default value?
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.
how will you disable it ?
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.
then go routine of periodic will not run, since the condition of the periodic interval is not positive, check here:
https://github.com/Mellanox/k8s-rdma-shared-dev-plugin/blob/master/pkg/resources/resources_manager.go#L288
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.
updated
cc27c09
to
91bf00c
Compare
@@ -77,7 +77,8 @@ var _ = Describe("ResourcesManger", func() { | |||
"deviceIDs": ["1017"], | |||
"ifNames": ["ib2", "ib3"]} | |||
} | |||
]}` | |||
], | |||
"periodicUpdateInterval": 60}` |
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.
can you add a test for the default value as well ?
and this should preferrably be changed to a different value (other than the default)
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.
added
This change brings a new config field which is used to config the periodic update interval of the device plugin. When periodic update interval is 0 periodic update is disabled Signed-off-by: Mamduh Alassi <mamduhala@mellanox.com>
91bf00c
to
5aa3f43
Compare
This change brings a new config field which is used to config the periodic update interval of the device plugin.
When periodic update interval is 0 periodic update is disabled
Fixes #27