-
Story
-
Resolution: Won't Do
-
Normal
-
None
-
Global Hub 1.0.0
Value Statement
Currently the non Kubernetes API of the global hub supports searching using the "labelSelector", but it doesn't support searching by "fieldSelector". For example, if a client application wanted to find the cluster with name "my-cluster" it would need to fetch all the clusters and then filter itself to find the matching one. That hurts performance and scalability both in the client and in the server.
The O-RAN O2 IMS implementation that we are starting to create is one such application. The specification for that API mandates support for queries like this:
GET .../deploymentManagers?filter=(eq,name,my-cluster)
We would like to be able to translate that `(eq,name,my-cluster)` query into a field selector (or something similar) that can then be evaluated by the ACM server, possible translating it into a SQL query that will be eventually evaluated by the PostgreSQL database.
Note that the Kubernetes field selectors are not enough, because the O-RAN O2 IMS also calls for support of operators other than `==` and `!=' . For example, it mandates support for the `cont` operator which checks if a string contains a sub-string. The complete list of operators that we need to support is this:
- `cont` - Checks if the attribute contains substring.
- `eq` - Check if the attribute is equal to the value.
- `gt` - Checks if the attribute is greater than the value.
- `gte`- Checks if the attribute is greater or equal than the value.
- `in` - Chekcks if the attribute is in a set of values.
- `lt` - Checks if the attribute is less than the value.
- `lte` - Cchecks if the attribute is less or equal than the value.
- `ncont` - Opposite of `cont`.
- `neq` - Opposite of `eq`.
- `nin` - Opposite of `in`.
Note that we aren't requesting this exact language to be implemented in ACM, just having a search mechanism that we can translate these queries into. For example, if it was "fieldSelectors" then we would expect to translate a query like this:
(lt,capacilty/cpu,10)
Into a field selector like this:
status.capacilty.cpu < 10
The ACM server would then be responsible to translate that field selector into whatever mechanism is appropriate for it (a SQL query, probably).
Definition of Done for Engineering Story Owner (Checklist)
- ...
Development Complete
- The code is complete.
- Functionality is working.
- Any required downstream Docker file changes are made.
Tests Automated
- [ ] Unit/function tests have been automated and incorporated into the
build. - [ ] 100% automated unit/function test coverage for new or changed APIs.
Secure Design
- [ ] Security has been assessed and incorporated into your threat model.
Multidisciplinary Teams Readiness
- [ ] Create an informative documentation issue using the [Customer
Portal_doc_issue template](
https://github.com/stolostron/backlog/issues/new?assignees=&labels=squad%3Adoc&template=doc_issue.md&title=),
and ensure doc acceptance criteria is met. Link the development issue to
the doc issue. - [ ] Provide input to the QE team, and ensure QE acceptance criteria
(established between story owner and QE focal) are met.
Support Readiness
- [ ] The must-gather script has been updated.