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
I believe one of the problems crossplane/crossplane#3287 intends to fix is ensuring the external names of composed resources are deterministic. The idea being that if a claim was deleted and then recreated, it would result in the same set of external resources (with the same names, in the external system) being recreated.
This is useful for migrating a claim from one control plane to another. It should be possible to:
Ensure all composed MRs have deletionPolicy: Orphan so that deleting the MR does not delete the external resource.
Delete the claim from the 'old' control plane.
Create an identical claim in the 'new' control plane.
Have Crossplane find and adopt all of the external resources that were orphaned in step 1, as composed resources of the new claim and XR.
In theory this should be possible today, but it requires some forethought to make it work. Specifically you must ensure all composed resources have a crossplane.io/external-name annotation that is deterministically derived from the claim. One way to do this is by patching from the XR's crossplane.io/claim-name annotation as suggested in crossplane/crossplane#3120 (comment).
I believe we should document this pattern as a Composition best-practice. It doesn't have to specifically be patching from claim-name, but rather being thoughtful and explicit about how your external-name annotations are specified. If you leave this up to Crossplane it will just copy the metadata.name of your composed resources, which will have a random suffix and thus be non-deterministic.
The text was updated successfully, but these errors were encountered:
What's Missing?
I believe one of the problems crossplane/crossplane#3287 intends to fix is ensuring the external names of composed resources are deterministic. The idea being that if a claim was deleted and then recreated, it would result in the same set of external resources (with the same names, in the external system) being recreated.
This is useful for migrating a claim from one control plane to another. It should be possible to:
deletionPolicy: Orphan
so that deleting the MR does not delete the external resource.In theory this should be possible today, but it requires some forethought to make it work. Specifically you must ensure all composed resources have a
crossplane.io/external-name
annotation that is deterministically derived from the claim. One way to do this is by patching from the XR'scrossplane.io/claim-name
annotation as suggested in crossplane/crossplane#3120 (comment).I believe we should document this pattern as a Composition best-practice. It doesn't have to specifically be patching from
claim-name
, but rather being thoughtful and explicit about how yourexternal-name
annotations are specified. If you leave this up to Crossplane it will just copy themetadata.name
of your composed resources, which will have a random suffix and thus be non-deterministic.The text was updated successfully, but these errors were encountered: