You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metac's GenericController introduces the concept of watch and attachments. One can think of watch as the resource that is observed via Informer and attachments as the resources that should be fetched/listed via Lister based invocations. With this concept in mind, how do we filter out the attachments that belong to the particular watch. Note that GenericController should list the attachments that may or may not be owned by the watch resource. In order to keep the attachments arbitrary and still if required filter them based on watch is what this issue is all about.
Possible Solution
This is the current GenericController that watches kind:Storage and returns the watch object along with all the PVCs and PVs.
This is the suggested GenericController that watches kind:Storage and returns specific PVCs & PVs. In this particular spec, PVCs that are owned by Storage and PVs that have the Storage name as its annotation are selected.
spec:
watch:
apiVersion: core/v1alpha1resource: storagesattachments:
- apiVersion: storage/v1resource: persistentvolumeclaimsmatchesWatch:
expressions:
- operator: OwnerIsWatch # Does watch own this PVC?
- apiVersion: storage/v1resource: persistentvolumesmatchesWatch:
expressions:
- key: ddp.openebs.io/storage-name # a key in PV's annotationsoperator: AnnotationIsWatchName # Is annotation value the name of Watch
The text was updated successfully, but these errors were encountered:
Motivation
Metac's GenericController introduces the concept of watch and attachments. One can think of watch as the resource that is observed via
Informer
and attachments as the resources that should be fetched/listed viaLister
based invocations. With this concept in mind, how do we filter out the attachments that belong to the particular watch. Note that GenericController should list the attachments that may or may not be owned by the watch resource. In order to keep the attachments arbitrary and still if required filter them based on watch is what this issue is all about.Possible Solution
This is the current GenericController that watches kind:Storage and returns the watch object along with all the PVCs and PVs.
This is the suggested GenericController that watches kind:Storage and returns specific PVCs & PVs. In this particular spec, PVCs that are owned by Storage and PVs that have the Storage name as its annotation are selected.
The text was updated successfully, but these errors were encountered: