-
Notifications
You must be signed in to change notification settings - Fork 112
feat: expose DeleteOptions in envfuncs.DeleteNamespace #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cartermckinnon The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@harshanarayana can you take a look at this one? |
|
/lgtm |
|
@vladimirvivien are you still an approver here? |
vladimirvivien
left a comment
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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.
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
Terminatingafter the test completes.I've exposed the
resources.DeleteOptionsto make this possible usingresources.WithDeletePropagation.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., Usage docs, etc.: