Skip to content

chore: add script to force delete a namespace#1345

Merged
lemaitre-aneo merged 1 commit intomainfrom
fl/delete-namespace-tool
Dec 27, 2024
Merged

chore: add script to force delete a namespace#1345
lemaitre-aneo merged 1 commit intomainfrom
fl/delete-namespace-tool

Conversation

@lemaitre-aneo
Copy link
Copy Markdown
Contributor

Motivation

Sometimes, when destruction goes wrong, the kubernetes namespace might end up being undeletable by conventional means. In those cases, even kubectl delete namespace NAME --force --grace-period=0 does nothing.

Description

Add a script to remove all the finalizers of the namespace to tell kubernetes that the namespace has now been finalized.

Impact

This script should be used only as a last resort as it might leave resources alive.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have thoroughly tested my modifications and added tests when necessary.
  • Tests pass locally and in the CI.
  • I have assessed the performance impact of my modifications.

jordancarrier
jordancarrier previously approved these changes Dec 27, 2024
@sonarqubecloud
Copy link
Copy Markdown

@lemaitre-aneo lemaitre-aneo merged commit 8f3b1a0 into main Dec 27, 2024
@lemaitre-aneo lemaitre-aneo deleted the fl/delete-namespace-tool branch December 27, 2024 15:31
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.

2 participants