kudobuilder / kudobuilder/kuttl

Option for custom cleanup before namespace deletion

Open
#482 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
824
Forks
103
Avg merge
1d 11h
Merged PRs (30d)
6

Description

**What would you like to be added**:
It would be nice to add an option to run a custom cleanup script before the namespace and everything is dropped.

**Why is this needed**:
In our case we run operator and database cluster custom resource which has finalizer and when kuttl finishes with the test it just tries to delete everything, but since the operator can be deleted first the database cr and the namespace will be left since it contains finalizer.
So it would be helpful to be able to execute custom cleanup which will remove the finalizers and we could then leave the kuttl to finish with deleting everything.
Currently we add a last step in each test where we drop the finalizer, but this only works if the test passes and this step is actually run (if the test fails the namespace and cr will be left until manually cleaned up).

We are open to making a contribution, but we need to know that it would make sense first, also maybe there's some better idea how to resolve this.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by reading keps/0001-kep-process.md and tracing the test teardown path that deletes the namespace. Define how a custom cleanup script is configured and invoked before namespace deletion, including failed-test teardown, and verify that finalizers can be removed before cleanup completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.