-
Notifications
You must be signed in to change notification settings - Fork 373
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
WIP: Add yaml manifest to cleanup all Antrea resources #307
Conversation
Thanks for your PR. The following commands are available:
These commands can only be run by members of the vmware-tanzu organization. |
This is still very much a work-in-progress, I'm opening this PR to gather feedback on the approach. For someone deleting Antrea, the steps would be as follows: * `kubectl delete -f <path to antrea.yml>` * `kubectl apply -f <path to antrea-cleanup.yml>` * check that job has completed with `kubectl -n kube-system get jobs` * `kubectl delete -f <path to antrea-cleanup.yml>` The cleanup manifest creates a DaemonSet that will perform the necessary deletion tasks on each Node. After the tasks have been completed, the "status" is reported to the cleanup controller through a custom resource. Once the controller has received enough statuses (or after a timeout of 1 minutes) the controller job completes and the user can delete the cleanup manifest. Known remaining items: * place cleanup binaries (antrea-cleanup-agent and antrea-cleanup-controller) in a separate docker image to avoid increasing the size of the main Antrea docker image * generate manifest with kustomize? * find a way to test this as part of CI? * update documentation * additional cleanup tasks: as of now we only take care of deleting the OVS bridge * place cleanup CRD in non-default namespace * use kubebuilder instead of the code generator directly (related to antrea-io#16); we probably want to punt this task to a future PR. See antrea-io#181
98f77e0
to
fb46399
Compare
@antoninbas: do you think we can reuse the AgentInfo and ControllerInfo CRD for the cleanup task status, instead of adding another CRD? Also two other thoughts:
|
Thought over. For Windows, we should use powershell to install Controllers and Agents, and so it makes sense to use powershell to uninstall and start cleanup. But in that case, we need not coordination between cleanup-agent and cleanup-controller, but just need one-off execution for cleaning up both Controller and Agent resources. |
@jianjuns FYI, I'm planning on starting work again on this PR this week and address these 2 comments from you:
|
Sounds great!
Will your cleanup DS also executes antctl? |
My idea was that they would share their implementation in |
Can one of the admins verify this patch? |
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days |
This is still very much a work-in-progress, I'm opening this PR to
gather feedback on the approach.
For someone deleting Antrea, the steps would be as follows:
kubectl delete -f <path to antrea.yml>
kubectl apply -f <path to antrea-cleanup.yml>
kubectl -n kube-system get jobs
kubectl delete -f <path to antrea-cleanup.yml>
The cleanup manifest creates a DaemonSet that will perform the necessary
deletion tasks on each Node. After the tasks have been completed, the
"status" is reported to the cleanup controller through a custom
resource. Once the controller has received enough statuses (or after a
timeout of 1 minutes) the controller job completes and the user can
delete the cleanup manifest.
Known remaining items:
antrea-cleanup-controller) in a separate docker image to avoid
increasing the size of the main Antrea docker image
OVS bridge
Use kubebuilder 1.16 instead of the code generator directly for CRDs #16); we probably want to punt this task to a future PR.
See #181