-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What problem are you facing?
Management policies (managementPolicies) define which actions Crossplane takes on an external resource using a set of primitive actions: Observe, Create, Update, Delete, LateInitialize, and * (all). These primitives intentionally mirror the methods of the ExternalClient interface.
There is a real and well-documented need (see #872, #864, #873, crossplane/crossplane#6694) for richer semantics around these actions — specifically:
- "Must create": Fail if the external resource already exists instead of silently adopting it
- "Orphan" shorthand: A convenient way to express ["Observe", "Create", "Update", "LateInitialize"] for users migrating from deletionPolicy: Orphan
PR #873 attempted to solve "must create" by adding a MustCreate ManagementAction, and PR #864 added an Orphan ManagementAction. Both were reverted before v2.2 because adding flavors of existing primitives has several problems:
- Combinatorial explosion: Every new action variant multiplies the supported policy combinations in defaultSupportedManagementPolicies(), which is already 15 entries.
-
- loses meaning: If MustCreate exists alongside Create, does * include MustCreate? What about Orphan?
- Composition breaks down: Combining Orphan (no Delete) with MustCreate (strict Create) would require yet another compound action or careful exclusion rules.
- Primitives should map to ExternalClient methods: Observe, Create, Update, Delete are clean primitives. MustCreate and Orphan are behavioral modifiers, not new operations.
How could Crossplane help solve your problem?
Find a way to enhance managementPolicies with behavior modifiers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
In Design