Skip to content

[BUG] clm: race condition during deleting certain releases created containing the release namespace #477

Description

@cbarbian-sap

Describe the bug

A release containing its own namespace as a dependent object can't be deleted, because the clm finalizer on the release ConfigMap (com.sap.cs.clm.release-<release>) blocks terminating the namespace.

Tested with Version
v0.3.158

To Reproduce
Steps to reproduce the behavior:

  1. Choose a source containing a Namespace; for example https://github.com/cert-manager/cert-manager/releases/download/v1.21.0/cert-manager.yaml
  2. Install it with --create-namespace (or precreate the namespace manually):
    clm -n cert-manager apply --create-namespace cert-manager /tmp/cert-manager.yaml
  3. Delete the release:
    clm -n cert-manager delete cert-manager
  4. Observe the deletion getting stuck. The namespace is in Terminating state, and the only object left is the release ConfigMap.

Expected behavior
The release shot properly be deleted.

Additional context
Maybe some special logic dropping the finalizer earlier if the ConfigMap is the only remaining object in the namespace.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions