Skip to content

Support for handling resource life-cycle modifiers #542

@barney-s

Description

@barney-s

Feature Description

Problem Statement:

We want to support different life-cycle modifiers such as:

  1. Create : allowed or not , force re-create if it exists
  2. Delete : allowed or not
  3. Update : allowed or not

Some example use cases:

  1. Annote a service account. May be create. But dont delete it.
  2. Create a DB object, but dont delete it.
  3. Create a Job but dont delete it.

Proposed Solution:

resources:
  - id: something
     template: ...
     lifecycle:
          create: always* | once | never
          delete: always* | abandon
          update: always* | never

Alternatives Considered:

For KCC (https://cloud.google.com/config-connector/docs/overview), the individual objects support its own lifecycle annotation to deal with the underlying GCP objects. We can use it for these resources.

Use annotations on the resource being created.

resources:
   id: something
   template:
      ...
      metadata:
         annotation:
            kro.lifecycle.delete: abandon

Advantage is this allows user to modify object lifecycle without modifying RGD for break-glass.

Additional Context:

#537

Resource annotateDefaultServiceAccount is the default SA created by Kubernetes for a namespace. We want to annotate it for Workload identity but not delete it.

  • Please vote on this issue by adding a 👍 reaction to the original issue
  • If you are interested in working on this feature, please leave a comment

Metadata

Metadata

Assignees

Labels

area/apikind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions