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

[Deploy] Fixes for smooth ArgoCD uninstall #2847

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

claudiolor
Copy link
Contributor

@claudiolor claudiolor commented Dec 5, 2024

Description

Cleanly uninstall Liqo with ArgoCD was not possible due to the fact that sometimes the deleting process was stuck due to resources having finalizers that were removed after the removal of the controller-manager (in charge of removing those finalizers) and some other residual resources polluted the cluster even after Liqo removal.

This PR introduces some fixes allowing to smoothly uninstall ArgoCD provided the following conditions are verified:

  • There are no pending peerings of offloaded namespace
  • The following configuration is defined at installation time:
common:
          globalLabels:
            app.kubernetes.io/instance: <ARGOCD_APP_NAME>
          globalAnnotations:
            argocd.argoproj.io/ignore-resource-updates: "true"
            argocd.argoproj.io/sync-options: Delete=true
            argocd.argoproj.io/sync-wave: 10
            argocd.argoproj.io/compare-options: IgnoreExtraneous
 

Where:

  • app.kubernetes.io/instance in globalLabels tells Liqo to add that labels to all the resources created by the controllers, in this case this allows ArgoCD to track all the resources created afterwards by controllers. While:
  • argocd.argoproj.io/sync-options: Delete=true: tells ArgoCD to remove the resources tracked with this annotation during deletion
  • argocd.argoproj.io/sync-wave: anticipate the deletion of the resources annotated with that label, so that controllers can remove the finalizers and perform the necessary cleanup

@claudiolor
Copy link
Contributor Author

/build

@adamjensenbot
Copy link
Collaborator

Hi @claudiolor. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • kind/breaking: 💥 Breaking Change
  • kind/feature: 🚀 New Feature
  • kind/bug: 🐛 Bug Fix
  • kind/cleanup: 🧹 Code Refactoring
  • kind/docs: 📝 Documentation

@claudiolor
Copy link
Contributor Author

/build

@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 9, 2024
@claudiolor
Copy link
Contributor Author

/build

@claudiolor claudiolor marked this pull request as ready for review December 9, 2024 16:30
@claudiolor claudiolor requested review from aleoli, fra98 and cheina97 and removed request for aleoli and fra98 December 9, 2024 16:31
@claudiolor
Copy link
Contributor Author

/build

@fra98 fra98 added the kind/bug label Dec 16, 2024
@claudiolor
Copy link
Contributor Author

/build

@cheina97
Copy link
Member

/rebase test=true

This patch changes the labels used for the virtual kubelet deployment to
avoid any conflicts with the `app.kubernetes.io/instance`, which is
the label used by ArgoCD by default to track the resources belonging to
an application. When this label was used, it was not possible to
remove a peer as the conflict between the two labels caused
controllers to not be able to get the vk deployment using labels.
This patch removes the owner reference of the physical node from the
internal node, as this caused some issues with the tear down with
ArgoCD. As the physical node does not belong to the application, the
InternalNode (owned by it) and all the resources owned by it were not
removed. The garbage collection of the InternalNode resources is
performed by a controller instead.
@fra98
Copy link
Member

fra98 commented Dec 17, 2024

/merge

@adamjensenbot adamjensenbot added the merge-requested Request bot merging (automatically managed) label Dec 17, 2024
@adamjensenbot adamjensenbot merged commit 5a120e7 into liqotech:master Dec 17, 2024
13 checks passed
@adamjensenbot adamjensenbot removed the merge-requested Request bot merging (automatically managed) label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants