-
Notifications
You must be signed in to change notification settings - Fork 406
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
Replace FieldSelector with LabelSelector in SC #2794
Comments
We ask that question on k8s office hours, see the recording here. We didn't get the clear statement which solution is more accurate. Puja Abbassi said that probably we should go with labels for this thing Joel Speed said that we should go with indexers as we had in POC cause it looks reasonable, it’s easier, not he is not a fan of duplication in spec and labels cause it's ugly. Other people agree with him. My proposition is to do the POC for LabelSecletor check how much code we will need to write and how complicated it is. But in my opinion for Service Catalog we should go with indexers, why?
Additionally, it's a Service Catalog implementation details and if in the future we will need some more complex logic for queries and indexers will not be maintainable then we can simply switch to LabelSelector but for now IMO using the LabelSelector is an overhead. |
I tried to replace FieldSelectors with indexers and I found few issues.
Each one needs to keep its own definition of indexers and informers. In case of webhook server it makes the architecture of the project more complicated. On startup we need to initialize indexers, and then pass some of them to request handlers - they cannot be created inside the handler cause cache would be initialized on every request. I'll try with LabelSelectors Tip: to find all fieldselectors in code search for 'List(listO' |
We need to have following fields as labels: ClusterServiceClass
ClusterServicePlan
ServiceClass
ServicePlan
ServiceInstance
|
Remember about DoD:
|
Follow up: |
The estimate was off by ~10 points.
|
…rs. (kyma-project#2794) * Workaround for assigning LoadBalancer IP in nightly and weekly clusters. * use yq instead of risky sed * typo
Description
Controller-manager is using the
FieldSelector
. This feature is not supported for CRD. You can query only byname
andnamespace
. Here is the k8s tests documenting that contract.TBD
AC for this issue is not yet defined. We plan to be on the k8s office hours meeting - hopefully we will get some suggestions which solution is prefered.
Highlights:
source: Issue about generic fieldSelector
Based on that comment, maybe the
FieldSelector
is not a good solution at all ;)Solution:
LabelSelector
and decorate the resource with additional labels, e.g.:service-catalog.k8s.io/spec.clusterServiceBrokerName
: helm-brokerIt's redundant because you have this information under spec and also in labels but e.g. Prow is using this approach.
Concerns:
The text was updated successfully, but these errors were encountered: