-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
What problem are you facing?
The spec.deletionPolicy field has been deprecated since the release of spec.managementPolicies and has been removed in v2 MRs. One benefit of this field was the ability to specify in a single field and attribute that Crossplane providers should not delete the remote/managed resource when the MR is deleted. It is trivial to add a deletionPolicy attribute to the claim and cascade the value down to all MRs in the compositions.
This is possible with managementPolicies but is more difficult to implement because it requires removing the Delete policy from the list of management policies, which defaults to '*' and would need to be changed to ['Observe', 'Create', 'LateInitialize', 'Update']. That would require logic in the composition to modify the managementPolicies field based on an input parameter, or the input parameter would have to be the list of desired policies which exposes more complexity to the end user.
How could Crossplane help solve your problem?
Crossplane can define a new management policy that includes all of the actions except Delete so that users can supply a single value to the policy list instead of needing to include a list of policies. For example a policy called "Orphan" could map to ['Observe', 'Create', 'LateInitialize', 'Update'] the same way the value '*' maps to ['Observe', 'Create', 'LateInitialize', 'Update', 'Delete'].
Metadata
Metadata
Assignees
Labels
Type
Projects
Status