Open nirs opened 1 year ago
@BenamarMk @ShyamsundarR what do you think?
Looks like this already mostly implemented - these resources already have app: app-name
:
Can be nice to have the same label on the vrs and replccation{source,destination} and maybe other but we can start using the current labels instead of depending on drpc/vrg/vr name.
Does not work for discovered apps:
The drpc has app= label added by the samples:
$ kubectl get drpc -l app=deployment-rbd -n ramen-ops --context hub
NAME AGE PREFERREDCLUSTER FAILOVERCLUSTER DESIREDSTATE CURRENTSTATE
deployment-rbd-drpc 18m dr1 Deployed
But the label is not propagated to the vrg and vrs:
$ kubectl get vrg -l app=deployment-rbd -n ramen-ops --context dr1
No resources found in ramen-ops namespace.
$ kubectl get vr -l app=deployment-rbd -n deployment-rbd --context dr1
No resources found in deployment-rbd namespace.
@raghavendra-talur do you know why the vrg and vr are missing the label from the drpc?
Current system does not have uniform way to find all the relevant ramen resources for specific application.
The system makes it very hard to locate all the resources without known the resource kind (e.g.
kubectl get all -n namespace
return only some kinds).Use cases
One application per namespace - subscriptions/rbd
One application per namespace - applicationset/rbd
One application per namespace - applicationset/cephfs
Multiple application per namespace
When creating an app we can use the same application namespace (subscription) or the same remote namespace (application sets).
Looks like this is hard to get right for users - deployment name and pvc names will conflict. Seems impossible with ocm-ramen-samples.
One application, multiple namespaces
(Not sure how this will look, @hatfieldbrian may add more info on this)
Locating stuff
Suggested solution
When users create applications in ACM, they must create an application name and use it to locate the application and perform actions.
Users also create an application namespace, not sure if we can use the same namespace to have multiple applications in the same namespace.
When the application is create from the UI, all resources related to the application can have the same label common label:
This can be applied to:
With this tools (like ramen kubectl plugin) can identify an application using:
Or using kubectl:
Tools can deal with the difference between subscriptions and applications sets by looking the application namespace and gitops namespace on the hub.
Current ocm-samples-ramen yamls already contain similar label:
But we don't have this in openshift. We need a uniform configuration in upstream and downstream so tools can work in the same way.
Issues
See also