Skip to content

Fix deletion of an Object not prompting deletion of resources dependent on the main object#437

Open
alanrichman wants to merge 1 commit intocrossplane-contrib:mainfrom
alanrichman:main
Open

Fix deletion of an Object not prompting deletion of resources dependent on the main object#437
alanrichman wants to merge 1 commit intocrossplane-contrib:mainfrom
alanrichman:main

Conversation

@alanrichman
Copy link
Copy Markdown

@alanrichman alanrichman commented Mar 23, 2026

Description of your changes

Fixes #342

When an Object resource is deleted, dependent resources (particularly Pods owned by Jobs) are not being properly cleaned up, resulting in orphaned Pods that remain in the cluster for a long time. In my experience it is about a week.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I followed the same procedure from the original issue with the current latest version of the provider (v1.2.1) and with the modified version from my fork. I validated that before the change Object deletion removed the Job but not its Pods, after the change Object deletion removed the Job and Pods.

…dent resources are deleted when object is deleted

Signed-off-by: Alan Richman <alanrichman@duck.com>
@phisco
Copy link
Copy Markdown
Collaborator

phisco commented Mar 24, 2026

This would mean everything gets deleted with foreground deletion, which would be a substantial behavior change. What if we made it configurable through the Object spec, defaulting to Background to preserve the current behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting an Object which created a Job does not delete the pods created by that job

2 participants