Skip to content
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

[RFE] undeploy: Add flag to leave namespace intact #2692

Open
burak-ok opened this issue Apr 5, 2024 · 1 comment
Open

[RFE] undeploy: Add flag to leave namespace intact #2692

burak-ok opened this issue Apr 5, 2024 · 1 comment

Comments

@burak-ok
Copy link
Member

burak-ok commented Apr 5, 2024

Current situation

When using kubectl gadget undeploy the namespace is getting removed

Impact

Different configurations and other things that might live in the same namespace will get removed.
For example PR #2675 introduces image verification. After a deploy one has to remember to add the label back to the namespace. This can be easily overseen

Ideal future situation

kubectl gadget undeploy --leave-namespace removes everything IG related, but keeps the namespace

Implementation options

Add the flag

@mauriciovasquezbernal
Copy link
Member

I see two options here to avoid adding a new flag.

  1. Add a label to the gadget namespace in deploy, so it's only removed if it was created by Inspektor Gadget. This will require to implement manual logic to remove the things (daemonset, etc...) inside the namespace without removing the namespace
  2. Don't do anything, if the user wants to keep the namespace, then they'll have to deploy IG directly from the manifest and handle it it by themselves.

I'm more leaned towards the second option, I don't think we should be complicating our logic to support a lot of corner cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants