Skip to content

Commit 180209c

Browse files
authored
docs: resource label selectors
1 parent 4ef09ec commit 180209c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/reference.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ When creating specialized roles for a deployment, roles should contain the union
105105
for all the child resources, specifically: `["list", "watch", "create", "patch", "delete"]`
106106
and `["list", "watch"]` for related resources.
107107

108-
The project is mainly tested with cluster-scoped deployment, however, QOSDK namespace-scoped deployments are also supported.
108+
Cluster and various (single or multiple) namespace-scoped deployments are supported.
109109

110110
### Sharding with label selectors
111111

@@ -144,6 +144,23 @@ you need to add the following configuration params:
144144
This will ensure that the labels are added correctly to the `Glue`. See the related
145145
[integration test](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/java/io/csviri/operator/glue/GlueOperatorComplexLabelSelectorTest.java#L23-L23).
146146

147+
### Label selectors for informers
148+
149+
Because of efficiency reasons, there is always one informer registered for a single resource type, even if there are more `Glue`-s or `GlueOperators`
150+
handled by a deployment that contains resources for the same type. For example, if there are multiple `Glues` managing `ConfigMaps` there will always be
151+
just one informer for a `ConfigMap`.Therefore, label selectors can be configured only per resource type, not per `Glue` or `GlueOperator`.
152+
153+
To configure a label selector for a resource use `glue.operator.resource-label-selector` (Map), which is followed by the identifier of the resource type in the key,
154+
and the value is the label selector itself. The resource type is in the form: `[group/]version#kind`.
155+
For example to define a label selector for ConfigMaps set:
156+
157+
`glue.operator.resource-label-selector.v1#ConfigMap=mylabel=samplevalue`
158+
159+
or for Deployment:
160+
161+
`glue.operator.resource-label-selector.apps/v1#Deployment=mylabel=samplevalue`
162+
163+
147164
## Implementation details and performance
148165

149166
Informers are used optimally, in terms of that, for every resource type only one informer is registered in the background. Event there are more `Glue` or `GlueOperator`

0 commit comments

Comments
 (0)