Skip to content

Conversation

@cartermckinnon
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

I want to delete a test's namespace in the foreground, to ensure the namespace is not left Terminating after the test completes.

I've exposed the resources.DeleteOptions to make this possible using resources.WithDeletePropagation.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

envfuncs.DeleteNamespace now accepts resources.DeleteOptions.

Additional documentation e.g., Usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Dec 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cartermckinnon
Once this PR has been reviewed and has the lgtm label, please assign cpanato for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 4, 2025
@cartermckinnon
Copy link
Contributor Author

@harshanarayana can you take a look at this one?

@harshanarayana
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 11, 2025
@cartermckinnon
Copy link
Contributor Author

@vladimirvivien are you still an approver here?

Copy link
Contributor

@vladimirvivien vladimirvivien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @cartermckinnon . Since it is changing the signature, please add some tests.

// namespace. It first searches for the ns in its context, if not found then
// attempt to retrieve it from the API server. Then deletes it.
func DeleteNamespace(name string) env.Func {
func DeleteNamespace(name string, opts ...resources.DeleteOption) env.Func {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be backward compatible. However, please add some tests.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants