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

NSE Composition: Registry should be able to match labels from NSE label as from list of labels #871

Closed
Bolodya1997 opened this issue Apr 26, 2021 · 5 comments
Assignees
Labels
blocked Something is blocking this enhancement New feature or request Planning The issue that related to current SOW

Comments

@Bolodya1997
Copy link

Overview

Registry should be able to match labels from NSE label as from list of labels:

NSE-1:  label=one
NSE-2:  label=two
NSE-12: label=one,two

find:   label=one
result: { NSE-1, NSE-12 }

find:   label=two
result: { NSE-2, NSE-12 }

References

Tests

  1. Unit tests in matchutils.
  2. Sandbox test (would be nice to create for both memory, k8s registries):
    1. add endpoint with list label (label=one,two)
    2. request NS with simple label (label=one)
@Bolodya1997 Bolodya1997 added the enhancement New feature or request label Apr 26, 2021
@Bolodya1997 Bolodya1997 changed the title Registry should be able to match labels from NSE label as from list of labels NSE Composition: Registry should be able to match labels from NSE label as from list of labels Apr 26, 2021
@denis-tingaikin denis-tingaikin added ASAP The issue that blocking SOW items or core use-cases Planning The issue that related to current SOW labels Apr 26, 2021
@Bolodya1997 Bolodya1997 mentioned this issue Apr 26, 2021
5 tasks
@denis-tingaikin denis-tingaikin removed the ASAP The issue that blocking SOW items or core use-cases label Apr 26, 2021
@denis-tingaikin denis-tingaikin added the blocked Something is blocking this label Apr 27, 2021
@d-uzlov
Copy link
Contributor

d-uzlov commented Apr 27, 2021

@edwarnicke
If we implement this, NSE labels will effectively become arrays of labels, packed into a string. It makes sense to change the API to have labels be arrays.
Do you approve such change in the API?

@edwarnicke
Copy link
Member

@d-uzlov I don't understand why this implies labels being an array packed as a string...

@d-uzlov
Copy link
Contributor

d-uzlov commented Apr 27, 2021

Well, if the description in this issue is correct, then "label=one,two should match both label=one and label=two" looks pretty much like "label should be considered an array, and label=<value> should match any endpoint which label contains <value> in it".
That is: if the description in this issue is correct. If it is not, we should probably discuss it in the parent issue.

@edwarnicke
Copy link
Member

I think there's discussion to be had in the parent issue.

@Bolodya1997
Copy link
Author

Don't actually needed because instead of doing this:

step: 1 -> step: 2
step: 3 -> step: 4

nse-1: { step: 1,3 } 
nse-2: { step: 2 }
nse-3: { step: 4 }

we can do that:

step: 1 -> step: 2
labe: a -> labe: b

nse-1: { step: 1, labe: a } 
nse-2: { step: 3 }
nse-3: { labe: b }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Something is blocking this enhancement New feature or request Planning The issue that related to current SOW
Projects
None yet
Development

No branches or pull requests

4 participants