-
Notifications
You must be signed in to change notification settings - Fork 200
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 ENV variables to specify default node selectors #372
Add ENV variables to specify default node selectors #372
Conversation
This PR has been tested using a custom m-apiserver image (openebs/m-apiserver:0.6-ns-dev) built with the changes specified in this PR.
Tested this by creating a 5 node cluster in the following way:
(b) Labelled one more node with nodetype=storage. The pending replica's now got scheduled onthe newly labelled node.
|
@kmova The UT code needs to mock the new interfaces that are created... |
Signed-off-by: kmova <kiran.mova@openebs.io>
Codecov Report
@@ Coverage Diff @@
## master #372 +/- ##
==========================================
+ Coverage 28.86% 28.95% +0.08%
==========================================
Files 65 65
Lines 5428 5457 +29
==========================================
+ Hits 1567 1580 +13
- Misses 3694 3706 +12
- Partials 167 171 +4
Continue to review full report at Codecov.
|
Looks good, can you please paste the generated deployment yaml spec of controller and replica. |
Controller Deployment of a Running Volume:
|
Replica Deployment:
|
Thanks @AmitKumarDas, @prateekpandey14 for quick reviews!
|
Signed-off-by: kmova kiran.mova@openebs.io
What this PR does / why we need it:
This PR allows the administrators to specify the nodes on which the OpenEBS Replica and Controller Pods have to be scheduled using Kubernetes "NodeSelector" option. While Taints/Tolerations also can be used for this purpose, "NodeSelectors" are much simpler to setup using the node labels. And an added advantage is that - this can be done without having to worry about pushing taints to non-storage nodes.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
The implementation follows the traditional approach of specifying an ENV variable similar to how taints and tolerations are specified. This code is required only till the CAS Templates feature is available.