-
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
feat(controller, api): add label selector to BlockDeviceClaim #397
Conversation
add label selector to BDC api. Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
0c1f47a
to
b5dc802
Compare
ced0b1a
to
efee66e
Compare
Codecov Report
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
- Coverage 49.15% 49.05% -0.11%
==========================================
Files 55 55
Lines 2429 2436 +7
==========================================
+ Hits 1194 1195 +1
- Misses 1140 1143 +3
- Partials 95 98 +3
Continue to review full report at Codecov.
|
efee66e
to
4c00fb4
Compare
4c00fb4
to
6720f9c
Compare
"custom label and hostname present on bd and selector": { | ||
bdLabels: map[string]string{ | ||
ndm.KubernetesHostNameLabel: fakeHostName, | ||
"ndm.io.test": "1234", |
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.
It will be good to add tests with values having alphabets & mix of alphabets, numbers & allowed special chars
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.
Is it okay if we take up in next PR, where we will refactor a bit of the list code and add more test cases. We have a client wrapper here and once a proper selector mechanism is added there, we will move all calls to that client.
- add label selector to list method using labels.Selector - include hostname label in the metav1.LabelSelector from BlockDeviceClaim Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
- add test cases for selector in BDC Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
move code to create selector from BDC spec to separate function Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
add tests for method to generate label selector from BDC spec. Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
e00b3cb
to
fde23ae
Compare
…s-archive#397) - add label selector to BDC api. - add label selector to list method using labels.Selector - include hostname label in the metav1.LabelSelector from BlockDeviceClaim - add test cases for selector in BDC Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
…s-archive#397) - add label selector to BDC api. - add label selector to list method using labels.Selector - include hostname label in the metav1.LabelSelector from BlockDeviceClaim - add test cases for selector in BDC Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
- add label selector to BDC api. - add label selector to list method using labels.Selector - include hostname label in the metav1.LabelSelector from BlockDeviceClaim - add test cases for selector in BDC Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
metav1.LabelSelector
to BlockDeviceClaim spec