Skip to content

Let users provide a custom deletion protection reason #8

@twobiers

Description

@twobiers

Currently, the function already provides a set of pre-defined reasons as per docs.

These reason strings appear in the Usage's spec.reason field and in deletion rejection messages, making it easy to understand why a resource cannot be deleted.

However, I think this statement is not yet fully true as it only indicates "who" protects from deleting and "where" the deletion protection was set - the "why" remains unclear as it is typically a decision done as to some functional requirement.
I believe it would be a good addition to add an additional annotation (or label) e.g. protection.fn.crossplane.io/reason so developers can pass context down to the usage.

apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
  annotation:
    protection.fn.crossplane.io/reason: |
      VPC is a critical component for our environment. Deletion would have a disastrous impact on our production environment. 
  name: my-vpc

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions