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

uninstall: set "cni.uninstall" to true on uninstall #1418

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Feb 27, 2023

There is a Helm variable, cni.uninstall, that tells the agent to clean up its CNI configuration file and plugin binaries. This behavior was disabled by default in PR cilium/cilium#24009. However, when we know we're uninstalling Cilium, we should re-enable the old behavior.

So, manually touch the key file in the configmap to enable uninstall. Then, the pre-stop hook will be activated on shutdown and clean up as usual.

@squeed squeed temporarily deployed to ci February 27, 2023 12:43 — with GitHub Actions Inactive
@squeed squeed temporarily deployed to ci March 15, 2023 12:11 — with GitHub Actions Inactive
@squeed squeed marked this pull request as ready for review March 15, 2023 12:11
@squeed squeed requested a review from a team as a code owner March 15, 2023 12:11
@squeed squeed requested a review from rolinh March 15, 2023 12:11
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Thanks @squeed! We need to call wp.Close() but other than that and some nitpicking LGTM.

install/uninstall.go Outdated Show resolved Hide resolved
install/uninstall.go Outdated Show resolved Hide resolved
There is a Helm variable, `cni.uninstall`, that tells the agent to clean
up its CNI configuration file and plugin binaries. This behavior was
disabled by default in PR cilium/cilium#24009.
However, when we *know* we're uninstalling Cilium, we should re-enable
the old behavior.

So, manually touch the key file in the configmap to enable uninstall.
Then, the pre-stop hook will be activated on shutdown and clean up as
usual.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
@squeed squeed temporarily deployed to ci March 16, 2023 09:26 — with GitHub Actions Inactive
@squeed
Copy link
Contributor Author

squeed commented Mar 16, 2023

@kaworu thanks for the review, updated!

@tklauser tklauser requested a review from kaworu March 16, 2023 14:37
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Thanks!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 16, 2023
@tklauser tklauser merged commit 21916db into cilium:master Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants