Open muvaf opened 4 years ago
cc @prasek @negz @hasheddan
See https://github.com/crossplaneio/stack-gcp/issues/157 . I think it's a valid use case for keeping the database while apps come and go, which is something reclaimPolicy: Recycle
can enable.
I still feel strongly that this is not a wise path. I posted a related comment over on https://github.com/crossplaneio/stack-gcp/issues/157#issuecomment-585379488.
I do think we should:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As of https://github.com/crossplaneio/crossplane-runtime/pull/87 this is not possible anymore. For the full context it might help to look at the discussions on that PR.
What problem are you facing?
Currently, we don't support rescheduling a
Released
managed resource to a new claim. This is inline with Kubernetes PVC/PV model, however, not all managed resources can be considered as stateful as volumes. So, users might want to re-use the same managed resource.Quoting from https://github.com/crossplaneio/crossplane-runtime/pull/87#issuecomment-555747586
I can see the point in not supporting
Recycle
for volumes because volume is a completely stateful entity and it's probably useless without a cleanup. But this doesn't apply to all managed resources we might support. There are some stateless resources like network, logical resource groups or high level pipeline services. To me, volume looks like one end of the spectrum and logical groupings on the other end. Database server is somewhat in-between since there could be separate apps use the same database server with different schemas. Another example could be that a user might want to provision a giant k8s cluster on top of reserved instances(less costly) and let it be reused by different teams. An example from outside of k8s world could be Amazon EMR clusters where you reserve instances for cost reasons but different people submit different jobs that are completely independent. My point is our model should be able to cover stateless cloud resources as well as stateful ones. As long as teams and/or apps are aware that the resource is recycled, it looks OK to me.How could Crossplane help solve your problem?
Introduce a new reclaim policy option
Recycle
but do not go into business of cleaning up the managed resource. Document that this just makes the managed resource available to reclaim and let the user decides whether they want it or not.