Skip to content

Enhance management policy options #930

@lsviben

Description

@lsviben

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:

  1. 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?
  2. Composition breaks down: Combining Orphan (no Delete) with MustCreate (strict Create) would require yet another compound action or careful exclusion rules.
  3. 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status
In Design

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions